Skip to content

Commit

Permalink
Merge pull request #114 from phooky/master
Browse files Browse the repository at this point in the history
Correctly handle CONNECT with zero-length client_id
  • Loading branch information
Nicolas committed Apr 29, 2018
2 parents 8921c79 + bbcf7b3 commit 7c8e393
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hbmqtt/broker.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def client_connected(self, listener_name, reader: ReaderAdapter, writer: WriterA

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()
Expand Down

0 comments on commit 7c8e393

Please sign in to comment.