[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[minion-cvs] Remove unneeded optimization and avoid possible data-dr...
Update of /home/minion/cvsroot/src/minion/lib/mixminion/server
In directory moria.mit.edu:/tmp/cvs-serv16103/lib/mixminion/server
Modified Files:
MMTPServer.py
Log Message:
Remove unneeded optimization and avoid possible data-dropping race condition
Index: MMTPServer.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/MMTPServer.py,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- MMTPServer.py 3 Sep 2003 15:55:20 -0000 1.49
+++ MMTPServer.py 4 Sep 2003 16:11:22 -0000 1.50
@@ -444,15 +444,13 @@
def __writeFn(self):
"""Hook to implement write"""
- out = self.__outbuf
- while len(out):
- r = self.__con.write(out) # may throw
+ while len(self.__outbuf):
+ r = self.__con.write(self.__outbuf) # may throw
assert r > 0
- out = out[r:]
+ self.__outbuf = self.__outbuf[r:]
- self.__outbuf = out
- if len(out) == 0:
+ if len(self.__outbuf) == 0:
self.finished()
def __handshakeFn(self):