Commit dc9cae12 authored by Jeremy Hylton's avatar Jeremy Hylton

Provide more detailed logging when connection fails

parent b459aaa9
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
"""Simple rpc mechanisms """Simple rpc mechanisms
""" """
__version__ = "$Revision: 1.14 $"[11:-2] __version__ = "$Revision: 1.15 $"[11:-2]
from cPickle import loads from cPickle import loads
import cPickle import cPickle
...@@ -140,9 +140,9 @@ class asyncRPC(SizedMessageAsyncConnection): ...@@ -140,9 +140,9 @@ class asyncRPC(SizedMessageAsyncConnection):
else: else:
s=socket.socket(socket.AF_INET, socket.SOCK_STREAM) s=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(connection) s.connect(connection)
except: except Exception, err:
if debug: if debug:
LOG(debug, DEBUG, "Failed to connect to server") LOG(debug, DEBUG, "Failed to connect to server: %s" % err)
if tryonce: return 0 if tryonce: return 0
time.sleep(t) time.sleep(t)
t=t*2 t=t*2
......
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