[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[minion-cvs] Fix a bug that would throw the server into an unstable ...
Update of /home/minion/cvsroot/src/minion/lib/mixminion/server
In directory moria.mit.edu:/tmp/cvs-serv888/lib/mixminion/server
Modified Files:
MMTPServer.py
Log Message:
Fix a bug that would throw the server into an unstable state on a bad keyid; fix a typo in the last patch.
Index: MMTPServer.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/MMTPServer.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- MMTPServer.py 10 Jan 2003 16:51:03 -0000 1.14
+++ MMTPServer.py 10 Jan 2003 18:15:49 -0000 1.15
@@ -634,9 +634,11 @@
keyID = sha1(self.getPeerPK().encode_key(public=1))
if self.keyID is not None:
if keyID != self.keyID:
- warn("Got unexpected Key ID from %s", self.address)
- # This may work again in a couple of hours
+ warn("Got unexpected Key ID from %s; shutting down connection",
+ self.address)
+ # The keyid may start being good in a while.
self.shutdown(err=1,retriable=1)
+ return
else:
debug("KeyID from %s is valid", self.address)
@@ -775,10 +777,10 @@
assert len(h) < 32
try:
- con = MMTPClientConnections(self.context,
- ip, port, keyID, messages, handles,
- self.onMessageSent,
- self.onMessageUndeliverable)
+ con = MMTPClientConnection(self.context,
+ ip, port, keyID, messages, handles,
+ self.onMessageSent,
+ self.onMessageUndeliverable)
con.register(self)
except socket.error, e:
LOG.error("Unexpected socket error connecting to %s:%s: %s",