node-ari-client icon indicating copy to clipboard operation
node-ari-client copied to clipboard

Client disconnection without warnings

Open djbaldey opened this issue 4 years ago • 0 comments

If there is a "connect" method, then why is there no "disconnect" method?

When we shut down the application, warnings of an increased level of attention appear in the Asterisk log:

 Deactivating Stasis app 'queue'
 Shutting down application 'queue'
 Destroying Stasis app queue
  == WebSocket connection from '127.0.0.1:52492' closed
    -- Remove stasis-queue/h/1, registrar=res_stasis; con=stasis-queue(0x7f5614007300); con->root=0x7f5614004a10
    -- Remove stasis-queue/_./1, registrar=res_stasis; con=stasis-queue(0x7f5614007300); con->root=0x7f5614004a10
[May  6 18:49:40] WARNING[4069]: res_http_websocket.c:518 ws_safe_read: Web socket closed abruptly
[May  6 18:49:40] WARNING[4069]: ari/ari_websockets.c:126 ast_ari_websocket_session_read: WebSocket read error: Success

The disconnect method is necessary to close the socket connection properly, and not to hard break it.

djbaldey avatar May 06 '21 09:05 djbaldey