def on_disconnect(self, broker):
        """
        Called by :class:`Broker` to force disconnect the stream. The base
        implementation simply closes :attr:`receive_side` and
        :attr:`transmit_side` and unregisters the stream from the broker.
        """
        LOG.debug('%r.on_disconnect()', self)
        if self.receive_side:
            broker.stop_receive(self)
            self.receive_side.close()
        if self.transmit_side:
            broker._stop_transmit(self)
            self.transmit_side.close()
        fire(self, 'disconnect')
def on_disconnect ( self , broker ) : LOG . debug ( '%r.on_disconnect()' , self ) if self . receive_side : broker . stop_receive ( self ) self . receive_side . close ( ) if self . transmit_side : broker . _stop_transmit ( self ) self . transmit_side . close ( ) fire ( self , 'disconnect' )
Called by :class:`Broker` to force disconnect the stream. The base
        implementation simply closes :attr:`receive_side` and
        :attr:`transmit_side` and unregisters the stream from the broker.