Failing to accept TCP/TLS connections in 9.18 detaches the quota in
isc__nm_failed_accept_cb, causing TCP4Clients and TCP6Clients statistics
to not decrease inside cleanup.
Fix by increasing the counter after the point of no failure but before
handling statistics through the client's socket is no longer valid.
UV_RUNTIME_CHECK(uv_timer_init, r);
uv_handle_set_data((uv_handle_t *)&csock->read_timer, csock);
- isc__nm_incstats(csock, STATID_CLIENTS);
-
r = uv_accept(&ssock->uv_handle.stream, &csock->uv_handle.stream);
if (r != 0) {
result = isc__nm_uverr2result(r);
isc_nmhandle_detach(&handle);
+ isc__nm_incstats(csock, STATID_CLIENTS);
+
/*
* sock is now attached to the handle.
*/
UV_RUNTIME_CHECK(uv_timer_init, r);
uv_handle_set_data((uv_handle_t *)&csock->read_timer, csock);
- isc__nm_incstats(csock, STATID_CLIENTS);
-
r = uv_accept(&ssock->uv_handle.stream, &csock->uv_handle.stream);
if (r != 0) {
result = isc__nm_uverr2result(r);
goto failure;
}
+ isc__nm_incstats(csock, STATID_CLIENTS);
+
/*
* sock is now attached to the handle.
*/