(self, code, reason=None)
Clear protocol handlers when connection is lost.
Clear protocol handlers when connection is lost.
Clear protocol handlers when connection is lost .
def closed(self, code, reason=None):
        """ Clear protocol handlers when connection is lost. """
        # Clear reference to client
        _OPEN_CLIENTS.remove(self._weakref)

        for handler in self.handlers.values():
            handler.client = None

        self.handlers.clear()
def closed ( self , code , reason = None ) : # Clear reference to client _OPEN_CLIENTS . remove ( self . _weakref ) for handler in self . handlers . values ( ) : handler . client = None self . handlers . clear ( )