mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2025-12-21 23:00:24 -08:00
drop disconnected spectators from games instead of keeping them alive
This commit is contained in:
@@ -35,7 +35,7 @@ Server_ProtocolHandler::~Server_ProtocolHandler()
|
||||
Server_Game *g = gameIterator.value().first;
|
||||
Server_Player *p = gameIterator.value().second;
|
||||
|
||||
if (authState == UnknownUser)
|
||||
if ((authState == UnknownUser) || p->getSpectator())
|
||||
g->removePlayer(p);
|
||||
else
|
||||
p->setProtocolHandler(0);
|
||||
|
||||
Reference in New Issue
Block a user