Update last activity so that the peer is not kicked for chat

This commit is contained in:
Benau 2019-01-15 01:53:32 +08:00
parent 6f823f9c9b
commit 639071f959

View File

@ -316,6 +316,8 @@ void ServerLobby::handleChat(Event* event)
{
if (!checkDataSize(event, 1)) return;
// Update so that the peer is not kicked
event->getPeer()->updateLastActivity();
const bool sender_in_game = event->getPeer()->isWaitingForGame();
core::stringw message;
event->data().decodeString16(&message);