Skip to content

Commit

Permalink
for some reason this stack overflows
Browse files Browse the repository at this point in the history
  • Loading branch information
braindigitalis committed Dec 18, 2024
1 parent 528e5cd commit 17896eb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/dpp/events/ready.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,13 @@ void ready::handle(discord_client* client, json &j, const std::string &raw) {
client->resume_gateway_url = ugly;
}
/* Pre-resolve it into our cache so that we aren't waiting on this when we need it later */
static_cast<void>(resolve_hostname(client->resume_gateway_url, "443"));
client->log(ll_debug, "Resume URL for session " + client->sessionid + " is " + ugly + " (host: " + client->resume_gateway_url + ")");
try {
static_cast<void>(resolve_hostname(client->resume_gateway_url, "443"));
client->log(ll_debug, "Resume URL for session " + client->sessionid + " is " + ugly + " (host: " + client->resume_gateway_url + ")");
}
catch (std::exception& e) {
client->log(ll_warning, "Resume URL " + client->resume_gateway_url + " does not resolve: " + std::string(e.what()));
}

client->ready = true;

Expand Down
1 change: 0 additions & 1 deletion src/dpp/sslclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ std::string ssl_client::get_cipher() {
}

void ssl_client::log(dpp::loglevel severity, const std::string &msg) const {
owner->log(severity, msg);
}

void ssl_client::complete_handshake(const socket_events* ev)
Expand Down

0 comments on commit 17896eb

Please sign in to comment.