]> git.ipfire.org Git - thirdparty/asterisk.git/commit
ari_websockets: Fix two issues in the cleanup of outbound websockets. master
authorGeorge Joseph <gjoseph@sangoma.com>
Wed, 22 Apr 2026 15:09:48 +0000 (09:09 -0600)
committergithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Tue, 28 Apr 2026 13:44:21 +0000 (13:44 +0000)
commitf7b60322b1b425b932a63148ccfdb3c3adf17c3b
treec575ff0ec7060173d81b4498cdc159cc410d089d
parent7a57d9f2ed4e61ec0cd7e5b71ed97ecebeeb743b
ari_websockets: Fix two issues in the cleanup of outbound websockets.

1.  session_cleanup() now saves the websocket type before unlinking the
session from the session registry.  This prevents a FRACK when cleaning
up per-call websockets when MALLOC_DEBUG is used.

2.  session_shutdown_cb() and outbound_sessions_load() now call
pthread_cancel() to cancel the session handler thread to prevent the
thread from continually trying to connect to a server after the
connection config has been removed by a reload.  This required the
thread to use pthread_cleanup_push() to clean up its reference to the
session instead of RAII because RAII destructors don't get run when
pthread_cancel() is used.

Resolves: #1894
res/ari/ari_websockets.c