#NEWLINE# def removeConnection( self , connection ) : #NEWLINE# #INDENT# '\n        Remove a protocol instance (SMPP binding) from the list of current connections.\n        @param connection: An instance of SMPPServerProtocol\n        ' #NEWLINE# if ( connection . system_id is None ) : #NEWLINE# #INDENT# self . log . debug ( 'SMPP connection attempt failed without binding.' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# system_id = connection . system_id #NEWLINE# bind_type = connection . bind_type #NEWLINE# self . bound_connections [ system_id ] . removeBinding ( connection ) #NEWLINE# self . log . info ( ( "Dropped %s bind for '%s'. Active binds: %s. Max binds: %s" % ( connection , system_id , self . getBoundConnectionCountsStr ( system_id ) , self . config . systems [ system_id ] [ 'max_bindings' ] ) ) ) #NEWLINE# if ( self . bound_connections [ system_id ] . getBindingCount ( ) == 0 ) : #NEWLINE# #INDENT# self . bound_connections . pop ( system_id )