Skip to content

Commit

Permalink
[Web] update on_disconnect args
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeDSM committed Jan 7, 2025
1 parent b11d3f8 commit 48ee3e8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ def on_connect(self):
self.clients_count += 1
self.logger.debug(f"Client connected. {self.clients_count} total clients.")

def on_disconnect(self):
def on_disconnect(self, reason):
# will be called after some time (requires timeout)
self.clients_count -= 1
self.logger.debug(f"Client disconnected. {self.clients_count} remaining clients.")
self.logger.debug(f"Client disconnected ({reason}). {self.clients_count} remaining clients.")

def _has_clients(self):
return self.clients_count > 0
Expand Down

0 comments on commit 48ee3e8

Please sign in to comment.