From 8d85fb7c11dfa83052d09402dbae21dde44392aa Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 4 Mar 2015 03:12:58 +0100 Subject: [ClickAndLoad] Fix https://github.com/pyload/pyload/issues/1220 --- module/plugins/hooks/ClickAndLoad.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins') diff --git a/module/plugins/hooks/ClickAndLoad.py b/module/plugins/hooks/ClickAndLoad.py index 1a7dec6ac..f3396be77 100644 --- a/module/plugins/hooks/ClickAndLoad.py +++ b/module/plugins/hooks/ClickAndLoad.py @@ -16,15 +16,15 @@ def forward(source, destination): destination.sendall(bufdata) bufdata = source.recv(bufsize) finally: - source.shutdown(socket.SHUT_RD) destination.shutdown(socket.SHUT_WR) + destination.close() #@TODO: IPv6 support class ClickAndLoad(Hook): __name__ = "ClickAndLoad" __type__ = "hook" - __version__ = "0.38" + __version__ = "0.39" __config__ = [("activated", "bool", "Activated" , True), ("port" , "int" , "Port" , 9666), @@ -68,11 +68,11 @@ class ClickAndLoad(Hook): try: dock_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) dock_socket.bind((ip, cnlport)) - dock_socket.listen(1) + dock_socket.listen(5) while True: client_socket, client_addr = dock_socket.accept() - self.logDebug("Connection from: %s" % client_addr) + self.logDebug("Connection from %s:%s" % client_addr) server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server_socket.connect(("127.0.0.1", webport)) -- cgit v1.2.3