From 1c311178e61d89543d6a07a0077437a56958e152 Mon Sep 17 00:00:00 2001 From: Karchnu Date: Sun, 1 Nov 2020 17:29:16 +0100 Subject: [PATCH] Fix faulty option. --- src/requests/transfer.cr | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/requests/transfer.cr b/src/requests/transfer.cr index c57760f..f647dd0 100644 --- a/src/requests/transfer.cr +++ b/src/requests/transfer.cr @@ -23,8 +23,9 @@ class FileStorage::Request raise NotLoggedException.new if user.nil? if filestoraged.faulty - if @faulty_nb == 4 - @faulty_nb = 0 + filestoraged.faulty_nb += 1 + if filestoraged.faulty_nb == 4 + filestoraged.faulty_nb = 0 raise "FAULTY" end end