Skip to content

Commit 1ac5e45

Browse files
committed
Fixed client not fully stopping all connections on disconnect
1 parent 1111af6 commit 1ac5e45

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

mumble/mumble.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,14 +825,21 @@ static void mumble_client_free(MumbleClient *client) {
825825
}
826826

827827
static void mumble_client_cleanup(MumbleClient *client) {
828+
if (uv_is_active((uv_handle_t*) &client->socket_udp)) {
829+
uv_udp_recv_stop(&client->socket_udp);
830+
}
828831
uv_close((uv_handle_t*) &client->socket_udp, NULL);
832+
if (uv_is_active((uv_handle_t*) &client->ssl_poll)) {
833+
uv_poll_stop(&client->ssl_poll);
834+
}
829835
uv_close((uv_handle_t*) &client->socket_tcp, NULL);
830836
if (uv_is_active((uv_handle_t*) &client->ping_timer)) {
831837
uv_timer_stop(&client->ping_timer);
832838
}
833839
if (uv_is_active((uv_handle_t*) &client->audio_timer)) {
834840
uv_timer_stop(&client->audio_timer);
835841
}
842+
uv_cancel((uv_req_t*)&client->tcp_connect_req);
836843

837844
LinkNode* current = client->stream_list;
838845

0 commit comments

Comments
 (0)