diff --git a/src/dpp/events/ready.cpp b/src/dpp/events/ready.cpp index 765f9a9daa..5e915237a1 100644 --- a/src/dpp/events/ready.cpp +++ b/src/dpp/events/ready.cpp @@ -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(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(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; diff --git a/src/dpp/sslclient.cpp b/src/dpp/sslclient.cpp index 324a2d0f7f..89e7242e29 100644 --- a/src/dpp/sslclient.cpp +++ b/src/dpp/sslclient.cpp @@ -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)