Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ class WebSocketMessage_Social_FriendChatMessage_Incoming : public WebSocketMessa
int64_t source_user_id;
int64_t target_user_id;
std::string message;

NLOHMANN_DEFINE_TYPE_INTRUSIVE(WebSocketMessage_Social_FriendChatMessage_Incoming, msg_id, source_user_id, target_user_id, message)
};

Expand Down Expand Up @@ -837,6 +837,13 @@ void WebSocket::Tick()
if (m_bReconnecting)
{
NetworkLog(ELogVerbosity::LOG_RELEASE, "[WebSocket] Re-Connected");

NGMP_OnlineServices_LobbyInterface* pLobbyInterface = NGMP_OnlineServicesManager::GetInterface<NGMP_OnlineServices_LobbyInterface>();
if (pLobbyInterface != nullptr && pLobbyInterface->IsInLobby())
{
NetworkLog(ELogVerbosity::LOG_RELEASE, "[WebSocket] Reconnected while in a lobby, refreshing it");
pLobbyInterface->UpdateRoomDataCache(nullptr);
}
}
else
{
Expand Down Expand Up @@ -927,7 +934,7 @@ void WebSocket::Tick()
m_vecWSPartialBuffer.clear();
return;
}

// SECURITY FIX: Store old size BEFORE resize to avoid off-by-one error in memcpy
size_t oldSize = m_vecWSPartialBuffer.size();
m_vecWSPartialBuffer.resize(oldSize + rlen);
Expand Down
Loading