You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We had some reports of a bug during TMM where a player who was trying to queue by themselves would get the "Only the party owner may enter the party into a queue" error message. It turns out this can be caused by an old party object not getting cleaned up, do to an aborted connection.
The problem is that there is no standard way for a service to handle cleanup for a closed connection. Each service has its own differently named cleanup function which is called by LobbyConnection.on_connection_lost, but only if LobbyConnection.player exists. However LobbyConnection.abort sets this field to None here:
I think we should add a standard on_connection_lost method to the Service base class and call it for all services from either Server or ServerContext when a disconnect happens.
The text was updated successfully, but these errors were encountered:
* Move on_connection_lost to Service base class
This enforces consistency accross all disconnect handlers and allows the
ServerContext to ensure that every disconnect handler is called.
* Add integration test
* Use eq for player comparision
* Add typing to limit
We had some reports of a bug during TMM where a player who was trying to queue by themselves would get the "Only the party owner may enter the party into a queue" error message. It turns out this can be caused by an old party object not getting cleaned up, do to an aborted connection.
The problem is that there is no standard way for a service to handle cleanup for a closed connection. Each service has its own differently named cleanup function which is called by
LobbyConnection.on_connection_lost
, but only ifLobbyConnection.player
exists. HoweverLobbyConnection.abort
sets this field toNone
here:server/server/lobbyconnection.py
Lines 100 to 105 in 55c42f0
since
on_connection_lost
is called after the call toabort
, this code never executes:server/server/lobbyconnection.py
Lines 1138 to 1144 in 55c42f0
I think we should add a standard
on_connection_lost
method to theService
base class and call it for all services from eitherServer
orServerContext
when a disconnect happens.The text was updated successfully, but these errors were encountered: