|
|
|
@ -2330,12 +2330,7 @@ class Broker(object):
|
|
|
|
|
for (side, func) in self.poller.poll(timeout):
|
|
|
|
|
self._call(side.stream, func)
|
|
|
|
|
|
|
|
|
|
def _broker_main(self):
|
|
|
|
|
try:
|
|
|
|
|
while self._alive:
|
|
|
|
|
self._loop_once()
|
|
|
|
|
|
|
|
|
|
fire(self, 'shutdown')
|
|
|
|
|
def _broker_shutdown(self):
|
|
|
|
|
for _, (side, _) in self.poller.readers + self.poller.writers:
|
|
|
|
|
self._call(side.stream, side.stream.on_shutdown)
|
|
|
|
|
|
|
|
|
@ -2352,6 +2347,14 @@ class Broker(object):
|
|
|
|
|
for _, (side, _) in self.poller.readers + self.poller.writers:
|
|
|
|
|
LOG.error('_broker_main() force disconnecting %r', side)
|
|
|
|
|
side.stream.on_disconnect(self)
|
|
|
|
|
|
|
|
|
|
def _broker_main(self):
|
|
|
|
|
try:
|
|
|
|
|
while self._alive:
|
|
|
|
|
self._loop_once()
|
|
|
|
|
|
|
|
|
|
fire(self, 'shutdown')
|
|
|
|
|
self._broker_shutdown()
|
|
|
|
|
except Exception:
|
|
|
|
|
LOG.exception('_broker_main() crashed')
|
|
|
|
|
|
|
|
|
|