kopia lustrzana https://github.com/Yakifo/amqtt
Add critical message if pub/sub operation is cancelled
rodzic
ddab6ff576
commit
09827d8a0f
|
@ -111,6 +111,8 @@ def do_pub(client, arguments):
|
||||||
logger.info("%s Disconnected from broker" % client.client_id)
|
logger.info("%s Disconnected from broker" % client.client_id)
|
||||||
except ConnectException as ce:
|
except ConnectException as ce:
|
||||||
logger.fatal("connection to '%s' failed: %r" % (arguments['--url'], ce))
|
logger.fatal("connection to '%s' failed: %r" % (arguments['--url'], ce))
|
||||||
|
except asyncio.CancelledError as cae:
|
||||||
|
logger.fatal("Publish canceled due to prvious error")
|
||||||
|
|
||||||
|
|
||||||
def main(*args, **kwargs):
|
def main(*args, **kwargs):
|
||||||
|
|
|
@ -85,6 +85,8 @@ def do_sub(client, arguments):
|
||||||
yield from client.disconnect()
|
yield from client.disconnect()
|
||||||
except ConnectException as ce:
|
except ConnectException as ce:
|
||||||
logger.fatal("connection to '%s' failed: %r" % (arguments['--url'], ce))
|
logger.fatal("connection to '%s' failed: %r" % (arguments['--url'], ce))
|
||||||
|
except asyncio.CancelledError as cae:
|
||||||
|
logger.fatal("Publish canceled due to prvious error")
|
||||||
|
|
||||||
|
|
||||||
def main(*args, **kwargs):
|
def main(*args, **kwargs):
|
||||||
|
|
Ładowanie…
Reference in New Issue