diff --git a/hbmqtt/broker.py b/hbmqtt/broker.py index dd95634..ef6840a 100644 --- a/hbmqtt/broker.py +++ b/hbmqtt/broker.py @@ -16,7 +16,7 @@ from hbmqtt.utils import format_client_message, gen_client_id _defaults = { 'bind-address': 'localhost', 'bind-port': 1883, - 'timeout-disconnect-delay': 10 + 'timeout-disconnect-delay': 2 } diff --git a/hbmqtt/mqtt/protocol/handler.py b/hbmqtt/mqtt/protocol/handler.py index b55b5ae..6dc173b 100644 --- a/hbmqtt/mqtt/protocol/handler.py +++ b/hbmqtt/mqtt/protocol/handler.py @@ -136,6 +136,7 @@ class ProtocolHandler: keepalive_timeout = self.session.keep_alive if keepalive_timeout <= 0: keepalive_timeout = None + self.logger.debug("Read keepalive timeout=%s s" % str(keepalive_timeout)) fixed_header = yield from asyncio.wait_for(MQTTFixedHeader.from_stream(self.session.reader), keepalive_timeout) if fixed_header: cls = packet_class(fixed_header)