|
|
|
@ -164,6 +164,7 @@ static void read_cb(socket_t sock, void* arg) { |
|
|
|
tc->fin_remote = 1; |
|
|
|
tc->fin_remote = 1; |
|
|
|
DEBUG_INFO(DEBUG_CATEGORY_SOCKET, "tcp_io: FIN fd=%d", (int)tc->sock); |
|
|
|
DEBUG_INFO(DEBUG_CATEGORY_SOCKET, "tcp_io: FIN fd=%d", (int)tc->sock); |
|
|
|
uasync_set_socket_read(tc->ua, tc->socket_id, 0); |
|
|
|
uasync_set_socket_read(tc->ua, tc->socket_id, 0); |
|
|
|
|
|
|
|
queue_waiter_cancel(tc->read_queue, &tc->read_waiter); |
|
|
|
if (tc->read_queue->count == 0) { |
|
|
|
if (tc->read_queue->count == 0) { |
|
|
|
if (tc->on_fin) tc->on_fin(tc, tc->arg); |
|
|
|
if (tc->on_fin) tc->on_fin(tc, tc->arg); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|