Skip to content

Commit

Permalink
don't use reconnect_url after receiving opcode 7
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkrissym committed Oct 4, 2024
1 parent 32d899a commit 902eeb3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Discord.C++/MainGateway.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
Expand Down

0 comments on commit 902eeb3

Please sign in to comment.