kopia lustrzana https://github.com/Yakifo/amqtt
correctly handle CONNECT with zero-length client_id
Zero-length client_ids in CONNECT packets show up in the payload as empty strings, not None; the broker should generate a new id for these connections.pull/8/head
rodzic
031580a3fc
commit
bbcf7b3849
|
@ -370,7 +370,7 @@ class Broker:
|
|||
|
||||
if client_session.clean_session:
|
||||
# Delete existing session and create a new one
|
||||
if client_session.client_id is not None:
|
||||
if client_session.client_id is not None and client_session.client_id != "":
|
||||
self.delete_session(client_session.client_id)
|
||||
else:
|
||||
client_session.client_id = gen_client_id()
|
||||
|
|
Ładowanie…
Reference in New Issue