viff

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 diff
     1.1 --- a/viff/runtime.py	Sat Jul 12 14:15:11 2008 +0200
     1.2 +++ b/viff/runtime.py	Sat Jul 12 15:58:56 2008 +0200
     1.3 @@ -261,6 +261,9 @@
     1.4          except AttributeError:
     1.5              self.peer_cert = None
     1.6  
     1.7 +    def connectionLost(self, reason):
     1.8 +        print "Connection lost:", reason
     1.9 +
    1.10      def stringReceived(self, string):
    1.11          """Called when a share is received.
    1.12  
    1.13 @@ -332,7 +335,12 @@
    1.14          if self.needed_protocols == 0:
    1.15              self.protocols_ready.callback(self.runtime)
    1.16  
    1.17 +    def clientConnectionLost(self, connector, reason):
    1.18 +        print "Client connection lost:", reason
    1.19  
    1.20 +    def clientConnectionFailed(self, connector, reason):
    1.21 +        print "Client connection failed:", reason
    1.22 +        
    1.23  def increment_pc(method):
    1.24      """Make *method* automatically increment the program counter.
    1.25