diff --git a/nsock/src/nsock_connect.c b/nsock/src/nsock_connect.c index aefc77cc4..ec598d3c5 100644 --- a/nsock/src/nsock_connect.c +++ b/nsock/src/nsock_connect.c @@ -146,7 +146,7 @@ static int nsock_make_socket(mspool *ms, msiod *iod, int family, int type, int p /* inheritable_socket is from nbase */ iod->sd = (int)inheritable_socket(family, type, proto); if (iod->sd == -1) { - perror("Socket troubles"); + nsock_log_error(ms, "Socket trouble: %s", socket_strerror(socket_errno())); return -1; }