From 902eeb3c9ab2877516374fa833ab0e97521e427a Mon Sep 17 00:00:00 2001 From: Arkrissym Date: Fri, 4 Oct 2024 20:13:40 +0200 Subject: [PATCH] don't use reconnect_url after receiving opcode 7 --- Discord.C++/MainGateway.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Discord.C++/MainGateway.cpp b/Discord.C++/MainGateway.cpp index 378b27b..93a66be 100644 --- a/Discord.C++/MainGateway.cpp +++ b/Discord.C++/MainGateway.cpp @@ -84,6 +84,7 @@ void DiscordCPP::MainGateway::on_websocket_incoming_message(const std::string& m case 7: _log.info("received opcode 7: reconnecting to the gateway"); try { + _resume_url = _url; _client->close(boost::beast::websocket::close_reason(boost::beast::websocket::close_code::going_away, "Server requested reconnect")); } catch (std::exception& e) { _log.error("Cannot close websocket: " + std::string(e.what()));