mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
Fix more races between connect and shutdown
There were more races that could happen while connecting to a socket while closing or shutting down the same socket. This commit introduces a .closing flag to guard the socket from being closed twice.
This commit is contained in:
@@ -201,6 +201,7 @@ typedef struct isc__nm_uvreq {
|
||||
uv_pipe_t ipc; /* used for sending socket
|
||||
* uv_handles to other threads */
|
||||
union {
|
||||
uv_handle_t handle;
|
||||
uv_req_t req;
|
||||
uv_getaddrinfo_t getaddrinfo;
|
||||
uv_getnameinfo_t getnameinfo;
|
||||
@@ -465,6 +466,7 @@ struct isc_nmsocket {
|
||||
* If active==false but closed==false, that means the socket
|
||||
* is closing.
|
||||
*/
|
||||
atomic_bool closing;
|
||||
atomic_bool closed;
|
||||
atomic_bool listening;
|
||||
atomic_bool listen_error;
|
||||
|
Reference in New Issue
Block a user