Skip to content

Commit

Permalink
[eclipse-kanto#98]Ensure graceful exit of the quickstart Python scrip…
Browse files Browse the repository at this point in the history
…t and the How-to guide Python scripts

Fixed hono_commands.py

Signed-off-by: Daniel Milchev <[email protected]>
  • Loading branch information
daniel-milchev committed Aug 31, 2022
1 parent 903bd54 commit 776795a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions quickstart/hono_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ def on_message(self, event):
print('[ok]', command)
else:
print('[error]')
event.receiver.close()
event.connection.close()

def on_connection_closed(self, event):
print('[closing]')
os.kill(os.getpid(), signal.SIGINT)


Expand Down

0 comments on commit 776795a

Please sign in to comment.