In UE 4.17 EFindLobbiesState::WaitForRequestLobbyData fails to find lobby/session data if in an active session. Any fix for this? I seems to be a miscount between LobbyIDs.Num() & SessionInt->PendingSearchLobbyIds.Num()
Seeing the same thing on 4.20.
Seeing the same thing on 4.27.
I’m writing this down in case anyone still has this problem.
I added my netid to the extra setting when creating a session, and excluded the server player’s netid when doing findsession.
If I do this, it will be searched even in the active session.
We fixed it with following modification:
bool IsMemberOfLobby(const FUniqueNetIdSteam& LobbyId)
{
FScopeLock ScopeLock(&JoinedLobbyLock);
#if !ENABLE_CUSTOM_ENGINE_CHANGES
return JoinedLobbyList.Find(LobbyId.AsShared()) != INDEX_NONE;
#else
// It seams that 'FUniqueNetIdSteam.AsShared()' is somehow broken or probably can't be used this way
// because 'JoinedLobbyList.Find()' returns 'INDEX_NONE' even for IDs that are present in the list.
//
// Maybe this method should in stead of 'FUniqueNetIdSteam' accept 'FUniqueNetIdSteamRef' because
// currently all use cases works that way.
for (int i = 0; i < JoinedLobbyList.Num(); i++)
{
if (*JoinedLobbyList[i] == LobbyId)
return true;
}
return false;
#endif
}