Commit fe1cb3d1 authored by Jim Fulton's avatar Jim Fulton

Added an exception handler to detect a case where the call/reposnse

mechanism is messed up. In this case, we just close the connection,
which will ultimately cause us to reconnect.
parent 2e9cfc97
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
"""Simple rpc mechanisms """Simple rpc mechanisms
""" """
__version__ = "$Revision: 1.7 $"[11:-2] __version__ = "$Revision: 1.8 $"[11:-2]
from cPickle import loads from cPickle import loads
from thread import allocate_lock from thread import allocate_lock
...@@ -228,7 +228,12 @@ class asyncRPC(SizedMessageAsyncConnection): ...@@ -228,7 +228,12 @@ class asyncRPC(SizedMessageAsyncConnection):
c=m[:1] c=m[:1]
if c in 'RE': if c in 'RE':
self.__r=m self.__r=m
self.__lr() try: self.__lr()
except:
# Eek, this should never happen. We're messed up.
# we'd better close the connection.
self.close()
raise
else: else:
oob=self._outOfBand oob=self._outOfBand
if oob is not None: if oob is not None:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment