]> git.pld-linux.org Git - projects/pld-ftp-admin.git/commitdiff
- I'm not sure if a non blocking socket can generate an exception on recv, but
authorMariusz Mazur <mmazur@pld-linux.org>
Tue, 11 Jan 2005 18:26:46 +0000 (18:26 +0000)
committerMariusz Mazur <mmazur@pld-linux.org>
Tue, 11 Jan 2005 18:26:46 +0000 (18:26 +0000)
  it's better to be safe, than sorry

Changed files:
    modules/cons.py -> 1.6

modules/cons.py

index 6fc02f27d5b303f3de6c8116edd9b4344a215aef..23998c7c3191485d4a68a546a03550a8e7b97ac9 100644 (file)
@@ -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
This page took 0.096105 seconds and 4 git commands to generate.