Skip to content

Commit

Permalink
Fixed|Server: Crash when server terminates remote user
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Sep 11, 2019
1 parent bae771e commit 9679291
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions doomsday/apps/server/src/remoteuser.cpp
Expand Up @@ -129,7 +129,7 @@ DE_PIMPL(RemoteUser)
// If the command is too long, it'll be considered invalid.
if (length >= 256)
{
trash(thisPublic);
disconnect();
return false;
}

Expand Down Expand Up @@ -182,7 +182,7 @@ DE_PIMPL(RemoteUser)
if (supplied != pwd.md5Hash())
{
// Wrong!
trash(thisPublic);
disconnect();
return false;
}
}
Expand Down Expand Up @@ -217,15 +217,15 @@ DE_PIMPL(RemoteUser)
else
{
// Couldn't join the game, so close the connection.
trash(thisPublic);
disconnect();
return false;
}
}
else
{
// Too bad, scoundrel! Goodbye.
LOG_NET_WARNING("Received an invalid request from %s") << id;
trash(thisPublic);
disconnect();
return false;
}

Expand Down Expand Up @@ -319,7 +319,6 @@ void RemoteUser::socketDisconnected()
{
d->state = Disconnected;
d->notifyClientExit();

trash(this);
}

Expand Down

0 comments on commit 9679291

Please sign in to comment.