mirror of
https://github.com/bstansell/conserver.git
synced 2025-04-23 18:13:36 +00:00
fix host consoles in combination --with-ipv6
With a non-blocking socket, connect(2) will set errno to EINPROGRESS and the user must then fetch the success/fail status from the socket. This was correctly handled in the IPv4 path, but not in the IPv6 path. Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
This commit is contained in:
parent
933f3271ad
commit
e862920a82
@ -931,10 +931,11 @@ ConsInit(CONSENT *pCE)
|
||||
# endif
|
||||
if (!SetFlags(cofile, O_NONBLOCK, 0))
|
||||
goto fail;
|
||||
if ((ret =
|
||||
connect(cofile, rp->ai_addr,
|
||||
rp->ai_addrlen)) == 0)
|
||||
goto success;
|
||||
|
||||
ret = connect(cofile, rp->ai_addr, rp->ai_addrlen);
|
||||
if (ret == 0 || errno == EINPROGRESS)
|
||||
goto success;
|
||||
|
||||
fail:
|
||||
close(cofile);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user