diff --git a/include/spdlog/sinks/tcp_sink.h b/include/spdlog/sinks/tcp_sink.h index 4b3a7457..e380d3bb 100644 --- a/include/spdlog/sinks/tcp_sink.h +++ b/include/spdlog/sinks/tcp_sink.h @@ -106,9 +106,9 @@ private: } else { - socket_rv = -1; last_errno = errno; ::close(socket_rv); + socket_rv = -1; } } ::freeaddrinfo(addrinfo_result);