When closing the socket that is actively reading from the stream, the
read_cb() could be called between uv_close() and close callback when the
server socket has been already detached hence using sock->statichandle
after it has been already freed.
if (sock->quota != NULL) {
isc_quota_detach(&sock->quota);
}
+
+ uv_read_stop((uv_stream_t *)&sock->uv_handle.handle);
+
if (sock->timer_initialized) {
sock->timer_initialized = false;
uv_timer_stop(&sock->timer);