mirror of
https://repo.or.cz/socat.git
synced 2024-12-23 07:52:32 +00:00
TCP-CONNECT with option nonblock reported successful connect even when it was still pending
This commit is contained in:
parent
c02a062db4
commit
4efa3c5ebc
2 changed files with 6 additions and 3 deletions
3
CHANGES
3
CHANGES
|
@ -44,6 +44,9 @@ corrections:
|
||||||
UNIX-CONNECT did not support half-close. Thanks to Greg Hughes who
|
UNIX-CONNECT did not support half-close. Thanks to Greg Hughes who
|
||||||
pointed me to that bug
|
pointed me to that bug
|
||||||
|
|
||||||
|
TCP-CONNECT with option nonblock reported successful connect even when
|
||||||
|
it was still pending
|
||||||
|
|
||||||
docu mentions option so-bindtodev but correct name is so-bindtodevice.
|
docu mentions option so-bindtodev but correct name is so-bindtodevice.
|
||||||
Thanks to Jim Zimmerman for reporting.
|
Thanks to Jim Zimmerman for reporting.
|
||||||
|
|
||||||
|
|
|
@ -952,15 +952,15 @@ int _xioopen_connect(struct single *xfd, struct sockaddr *us, size_t uslen,
|
||||||
Close(xfd->rfd);
|
Close(xfd->rfd);
|
||||||
return STAT_RETRYLATER;
|
return STAT_RETRYLATER;
|
||||||
}
|
}
|
||||||
|
} else { /* result >= 0 */
|
||||||
|
Notice1("successfully connected from local address %s",
|
||||||
|
sockaddr_info(&la.soa, themlen, infobuff, sizeof(infobuff)));
|
||||||
}
|
}
|
||||||
|
|
||||||
applyopts_fchown(xfd->rfd, opts); /* OPT_USER, OPT_GROUP */
|
applyopts_fchown(xfd->rfd, opts); /* OPT_USER, OPT_GROUP */
|
||||||
applyopts(xfd->rfd, opts, PH_CONNECTED);
|
applyopts(xfd->rfd, opts, PH_CONNECTED);
|
||||||
applyopts(xfd->rfd, opts, PH_LATE);
|
applyopts(xfd->rfd, opts, PH_LATE);
|
||||||
|
|
||||||
Notice1("successfully connected from local address %s",
|
|
||||||
sockaddr_info(&la.soa, themlen, infobuff, sizeof(infobuff)));
|
|
||||||
|
|
||||||
return STAT_OK;
|
return STAT_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue