#NEWLINE# def clientConnectionFailed( self , connector , reason ) : #NEWLINE# #INDENT# self . logger . error ( ( 'Connection failed: %s - %s' % ( reason . type , reason . value ) ) ) #NEWLINE# registry . removeSession ( self ) #NEWLINE# self . state = base . STATE_DISCONNECTED #NEWLINE# if ( ( error . ConnectionRefusedError == reason . type ) or ( error . TCPTimedOutError == reason . type ) or ( error . TimeoutError == reason . type ) ) : #NEWLINE# #INDENT# if ( self . peerType == base . CLIENT ) : #NEWLINE# #INDENT# self . notify ( collab_event . FAILED_SESSION , reason . sharingWithUser ) #NEWLINE# #UNINDENT# #UNINDENT# self . disconnect ( )