#NEWLINE# def onClose( self , wasClean , code , reason ) : #NEWLINE# #INDENT# self . factory . _cookies [ self . _cbtid ] [ 'connections' ] . remove ( self ) #NEWLINE# if ( not self . factory . _cookies [ self . _cbtid ] [ 'connections' ] ) : #NEWLINE# #INDENT# log . msg ( 'All connections for {} gone' . format ( self . _cbtid ) )