Skip to content

Commit

Permalink
Fixed client not fully stopping all connections on disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
bkacjios committed Jan 3, 2025
1 parent 1111af6 commit 1ac5e45
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mumble/mumble.c
Original file line number Diff line number Diff line change
Expand Up @@ -825,14 +825,21 @@ static void mumble_client_free(MumbleClient *client) {
}

static void mumble_client_cleanup(MumbleClient *client) {
if (uv_is_active((uv_handle_t*) &client->socket_udp)) {
uv_udp_recv_stop(&client->socket_udp);
}
uv_close((uv_handle_t*) &client->socket_udp, NULL);
if (uv_is_active((uv_handle_t*) &client->ssl_poll)) {
uv_poll_stop(&client->ssl_poll);
}
uv_close((uv_handle_t*) &client->socket_tcp, NULL);
if (uv_is_active((uv_handle_t*) &client->ping_timer)) {
uv_timer_stop(&client->ping_timer);
}
if (uv_is_active((uv_handle_t*) &client->audio_timer)) {
uv_timer_stop(&client->audio_timer);
}
uv_cancel((uv_req_t*)&client->tcp_connect_req);

LinkNode* current = client->stream_list;

Expand Down

0 comments on commit 1ac5e45

Please sign in to comment.