From 9cf72b4d90423fd0768e7b07ca9307cccf6a09ac Mon Sep 17 00:00:00 2001
From: Nitzo <nitzo2001@yahoo.com>
Date: Sun, 14 Feb 2016 03:48:42 +0200
Subject: [Captcha] fix #2340

---
 module/plugins/internal/Captcha.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'module/plugins')

diff --git a/module/plugins/internal/Captcha.py b/module/plugins/internal/Captcha.py
index 7e851ed5d..b83596771 100644
--- a/module/plugins/internal/Captcha.py
+++ b/module/plugins/internal/Captcha.py
@@ -12,7 +12,7 @@ from module.plugins.internal.misc import encode
 class Captcha(Plugin):
     __name__    = "Captcha"
     __type__    = "captcha"
-    __version__ = "0.53"
+    __version__ = "0.54"
     __status__  = "stable"
 
     __description__ = """Base anti-captcha plugin"""
@@ -100,7 +100,11 @@ class Captcha(Plugin):
             result = self.task.result
 
             if self.task.error:
-                self.pyfile.plugin.retry_captcha(msg=self.task.error)
+                if not self.task.handler and not self.pyload.isClientConnected():
+                    self.log_warning(_("No Client connected for captcha decrypting"))
+                    self.fail(_("No Client connected for captcha decrypting"))
+                else:
+                    self.pyfile.plugin.retry_captcha(msg=self.task.error)
 
             elif self.task.result:
                 self.log_info(_("Captcha result: `%s`") % (result,))
-- 
cgit v1.2.3