summaryrefslogtreecommitdiff
path: root/src/network/socket_handler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/socket_handler.cpp')
-rw-r--r--src/network/socket_handler.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/network/socket_handler.cpp b/src/network/socket_handler.cpp
index ea674d1..3fe423e 100644
--- a/src/network/socket_handler.cpp
+++ b/src/network/socket_handler.cpp
@@ -56,8 +56,7 @@ std::pair<bool, std::string> SocketHandler::connect(const std::string& address,
this->on_connected();
return std::make_pair(true, "");
}
- log_info("Connection failed:");
- perror("connect");
+ log_info("Connection failed:" << strerror(errno));
}
log_error("All connection attempts failed.");
this->close();
@@ -97,7 +96,7 @@ void SocketHandler::on_send()
const ssize_t res = ::send(this->socket, this->out_buf.data(), this->out_buf.size(), 0);
if (res == -1)
{
- perror("send");
+ log_error("send failed: " << strerror(errno));
this->close();
}
else