changeset 818:3543e266d88a

Print reason when connections are lost or fail.
author Martin Geisler <mg@daimi.au.dk>
date Sat, 12 Jul 2008 15:58:56 +0200
parents 8f2fef319cb7
children 1ed10c3ce40c
files viff/runtime.py
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/viff/runtime.py	Sat Jul 12 14:15:11 2008 +0200
+++ b/viff/runtime.py	Sat Jul 12 15:58:56 2008 +0200
@@ -261,6 +261,9 @@
         except AttributeError:
             self.peer_cert = None
 
+    def connectionLost(self, reason):
+        print "Connection lost:", reason
+
     def stringReceived(self, string):
         """Called when a share is received.
 
@@ -332,7 +335,12 @@
         if self.needed_protocols == 0:
             self.protocols_ready.callback(self.runtime)
 
+    def clientConnectionLost(self, connector, reason):
+        print "Client connection lost:", reason
 
+    def clientConnectionFailed(self, connector, reason):
+        print "Client connection failed:", reason
+        
 def increment_pc(method):
     """Make *method* automatically increment the program counter.