forked from mirrors/kore
set fd to -1 on close.
This commit is contained in:
parent
d371454dad
commit
ce012e7bd5
@ -1935,9 +1935,10 @@ pysocket_close(struct pysocket *sock, PyObject *args)
|
||||
sock->socket = NULL;
|
||||
} else if (sock->fd != -1) {
|
||||
(void)close(sock->fd);
|
||||
sock->fd = -1;
|
||||
}
|
||||
|
||||
sock->fd = -1;
|
||||
|
||||
Py_RETURN_TRUE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user