@ -619,8 +619,10 @@ class BasicStream(object):
LOG.debug('%r.on_disconnect()', self)
broker.stop_receive(self)
broker.stop_transmit(self)
self.receive_side.close()
self.transmit_side.close()
if self.receive_side:
if self.transmit_side:
fire(self, 'disconnect')
def on_shutdown(self, broker):