#NEWLINE# def closed( self , reason ) : #NEWLINE# #INDENT# 'Callback performed when the transport is closed.' #NEWLINE# self . server . remove_connection ( self ) #NEWLINE# self . protocol . connection_lost ( reason ) #NEWLINE# if ( not isinstance ( self , ConnectionClosed ) ) : #NEWLINE# #INDENT# logger . warn ( ( 'connection closed, reason: %s' % str ( reason ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# logger . info ( 'connection closed' )