summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/network/core/tcp_connect.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/network/core/tcp_connect.cpp b/src/network/core/tcp_connect.cpp
index 29e9048d9..73c6aa90d 100644
--- a/src/network/core/tcp_connect.cpp
+++ b/src/network/core/tcp_connect.cpp
@@ -205,9 +205,13 @@ void TCPConnecter::OnResolved(addrinfo *ai)
}
if (_debug_net_level >= 6) {
- Debug(net, 6, "{} resolved in:", this->connection_string);
- for (const auto &address : this->addresses) {
- Debug(net, 6, "- {}", NetworkAddress(address->ai_addr, (int)address->ai_addrlen).GetAddressAsString());
+ if (this->addresses.size() == 0) {
+ Debug(net, 6, "{} did not resolve", this->connection_string);
+ } else {
+ Debug(net, 6, "{} resolved in:", this->connection_string);
+ for (const auto &address : this->addresses) {
+ Debug(net, 6, "- {}", NetworkAddress(address->ai_addr, (int)address->ai_addrlen).GetAddressAsString());
+ }
}
}