(self, fd)
removes a connection by closing it and removing it from internal structs
removes a connection by closing it and removing it from internal structs
removes a connection by closing it and removing it from internal structs
def _drop_connection(self, fd):
        '''removes a connection by closing it and removing it from internal structs'''
        # cleanup fd_to_conn dictionnary
        try:
            conn = self.fd_to_conn[fd]
            del self.fd_to_conn[fd]
        except KeyError:
            # the active connection has already been removed
            pass
        # close connection
        conn.close()
def _drop_connection ( self , fd ) : # cleanup fd_to_conn dictionnary try : conn = self . fd_to_conn [ fd ] del self . fd_to_conn [ fd ] except KeyError : # the active connection has already been removed pass # close connection conn . close ( )