Skip to content

Commit

Permalink
Fix Websocket close
Browse files Browse the repository at this point in the history
  • Loading branch information
joecupano committed Mar 27, 2021
1 parent 0d5ece5 commit e41f0a2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions HASviolet_websox.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# USAGE: HASviolet_websox.py
#
# REVISION: 20210312-1400
# REVISION: 20210327-0700
#
#

Expand Down Expand Up @@ -178,10 +178,8 @@ def on_message(self, message):
HASit.transmit(message)

def on_close(self):
if self not in wsxCLIENTS:
wsxCLIENTS.remove(self)
wsxCLIENTS.remove(self)
print ('WS:CLIENT:CLOSED')
self.write_message("WS:CLIENT:CLOSED")
gc.collect()


Expand Down

0 comments on commit e41f0a2

Please sign in to comment.