Warnings/Network: Handle ENET_EVENT_TYPE_NONE and ENET_EVENT_TYPE_CONNECT in the network packet loop.

ENET_EVENT_TYPE_NONE is basically a no-op.

ENET_EVENT_TYPE_CONNECT should not happen since we are already connected. Assert in case we do receive it.
This commit is contained in:
Subv 2020-04-10 18:35:14 -05:00
parent 23921e3203
commit 7903f6fbfc
1 changed files with 7 additions and 0 deletions

View File

@ -242,6 +242,13 @@ void RoomMember::RoomMemberImpl::MemberLoop() {
SetError(Error::LostConnection);
}
break;
case ENET_EVENT_TYPE_NONE:
break;
case ENET_EVENT_TYPE_CONNECT:
// The ENET_EVENT_TYPE_CONNECT event can not possibly happen here because we're
// already connected
ASSERT_MSG(false, "Received unexpected connect event while already connected");
break;
}
}
{