[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Check for socket error as well as OS error from closed work...
Update of /home/or/cvsroot/control/python
In directory moria:/tmp/cvs-serv952
Modified Files:
TorCtl0.py TorCtl1.py
Log Message:
Check for socket error as well as OS error from closed worker threads.
Index: TorCtl0.py
===================================================================
RCS file: /home/or/cvsroot/control/python/TorCtl0.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- TorCtl0.py 27 Sep 2005 17:36:38 -0000 1.4
+++ TorCtl0.py 12 Nov 2005 21:22:25 -0000 1.5
@@ -304,7 +304,7 @@
while 1:
try:
length, tp, body = _receive_message(self._s)
- except OSError:
+ except (OSError, socket.error), _:
if self._queue.get(timeout=0) != "CLOSE":
raise
if tp == MSG_TYPE.EVENT:
Index: TorCtl1.py
===================================================================
RCS file: /home/or/cvsroot/control/python/TorCtl1.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- TorCtl1.py 11 Nov 2005 19:53:54 -0000 1.7
+++ TorCtl1.py 12 Nov 2005 21:22:25 -0000 1.8
@@ -155,7 +155,7 @@
while 1:
try:
lines = _read_reply(self._s,self._debugFile)
- except OSError:
+ except (OSError, socket.error), _:
if self._queue.get(timeout=0) != "CLOSE":
raise
assert lines