From: Mariusz Mazur Date: Tue, 11 Jan 2005 18:26:46 +0000 (+0000) Subject: - I'm not sure if a non blocking socket can generate an exception on recv, but X-Git-Url: http://git.pld-linux.org/?a=commitdiff_plain;h=5b5cb48255bef27c65d4368f8ead0cb7b3482911;p=projects%2Fpld-ftp-admin.git - I'm not sure if a non blocking socket can generate an exception on recv, but it's better to be safe, than sorry Changed files: modules/cons.py -> 1.6 --- diff --git a/modules/cons.py b/modules/cons.py index 6fc02f2..23998c7 100644 --- a/modules/cons.py +++ b/modules/cons.py @@ -19,7 +19,10 @@ class Connection: self.sock.close() rm(self) def handleinput(self): - newdata=self.sock.recv(8192) + try: + newdata=self.sock.recv(8192) + except: + self.destroy() if not newdata: self.destroy() self.data=self.data+newdata