src/usocket: Do not setblocking on destroy;
This results in unexpected behaviour if the socket has been `dup()`d, as O_NONBLOCK is shared. Close is always 'blocking' anyway See https://github.com/wahern/cqueues/issues/13 for an example use case
This commit is contained in:
parent
d80bb0d82b
commit
e602c2b271
1 changed files with 0 additions and 1 deletions
|
@ -92,7 +92,6 @@ int socket_close(void) {
|
||||||
\*-------------------------------------------------------------------------*/
|
\*-------------------------------------------------------------------------*/
|
||||||
void socket_destroy(p_socket ps) {
|
void socket_destroy(p_socket ps) {
|
||||||
if (*ps != SOCKET_INVALID) {
|
if (*ps != SOCKET_INVALID) {
|
||||||
socket_setblocking(ps);
|
|
||||||
close(*ps);
|
close(*ps);
|
||||||
*ps = SOCKET_INVALID;
|
*ps = SOCKET_INVALID;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue