diff --git a/src/pc/network/discord/discord_network.c b/src/pc/network/discord/discord_network.c index 2cfcb535..381b3950 100644 --- a/src/pc/network/discord/discord_network.c +++ b/src/pc/network/discord/discord_network.c @@ -76,8 +76,9 @@ void discord_network_init(int64_t lobbyId) { } void discord_network_shutdown(void) { - app.lobbies->flush_network(app.lobbies); if (gCurLobbyId == 0) { return; } + app.lobbies->flush_network(app.lobbies); app.lobbies->disconnect_network(app.lobbies, gCurLobbyId); + app.lobbies->flush_network(app.lobbies); LOGFILE_INFO(LFT_DISCORD, "shutdown network, lobby = " DISCORD_ID_FORMAT, gCurLobbyId); } \ No newline at end of file diff --git a/src/pc/network/discord/lobby.c b/src/pc/network/discord/lobby.c index a0271cca..f99cf533 100644 --- a/src/pc/network/discord/lobby.c +++ b/src/pc/network/discord/lobby.c @@ -115,6 +115,13 @@ void discord_lobby_leave(void) { LOGFILE_INFO(LFT_DISCORD, "left lobby " DISCORD_ID_FORMAT, gCurLobbyId); + if (snprintf(gCurActivity.party.id, 128, "%s", "none") < 0) { + LOGFILE_ERROR(LFT_DISCORD, "Truncating party id"); + } + gCurActivity.party.size.current_size = 1; + gCurActivity.party.size.max_size = 1; + discord_activity_update(gNetworkType == NT_SERVER); + isHosting = false; gCurLobbyId = 0; } diff --git a/src/pc/network/network.c b/src/pc/network/network.c index dae9f0ec..fd8b6928 100644 --- a/src/pc/network/network.c +++ b/src/pc/network/network.c @@ -77,6 +77,7 @@ bool network_init(enum NetworkType inNetworkType) { return false; } + network_forget_all_reliable(); crash_handler_init(); // set server settings