improve diagnostics for socket connections to fishd

This commit is contained in:
David Adam 2013-11-05 16:15:34 +08:00
parent 6d542b8bb0
commit 6640167410

View file

@ -123,7 +123,7 @@ static int try_get_socket_once(void)
free(dir);
debug(3, L"Connect to socket %s at fd %2", name.c_str(), s);
debug(3, L"Connect to socket %s at fd %d", name.c_str(), s);
struct sockaddr_un local = {};
local.sun_family = AF_UNIX;
@ -132,6 +132,7 @@ static int try_get_socket_once(void)
if (connect(s, (struct sockaddr *)&local, sizeof local) == -1)
{
close(s);
wperror(L"connect");
return -1;
}