Commit 657f9768 authored by Max-Wilhelm Bruker's avatar Max-Wilhelm Bruker
Browse files

drop disconnected spectators from games instead of keeping them alive

parent 57f9e2c3
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment