Merge pull request #37 from wkz/master

fix host consoles in combination --with-ipv6
This commit is contained in:
Bryan Stansell 2020-01-29 07:47:40 -08:00 committed by GitHub
commit 51ac2ace52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}