[asterisk-dev] [Code Review] 2678: Continue events when ARI WebSocket reconnects

David Lee reviewboard at asterisk.org
Tue Jul 16 10:45:19 CDT 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2678/
-----------------------------------------------------------

Review request for Asterisk Developers.


Bugs: ASTERISK-21970
    https://issues.asterisk.org/jira/browse/ASTERISK-21970


Repository: Asterisk


Description
-------

This patch addresses a bug in the /ari/events WebSocket in handling
reconnects.

When a Stasis application's associated WebSocket was disconnected and
reconnected, it would not receive events for any channels or bridges
it was subscribed to.

The fix was to lazily clean up Stasis application registrations,
instead of removing them as soon as the WebSocket goes away.

When an application is unregistered at the WebSocket level, the
underlying application is simply deactivated. If the application
WebSocket is reconnected, the application is reactivated for the new
connection.

To avoid memory leaks from lingering, unused application, the
application list is cleaned up whenever new applications are
registered/unregistered.


Diffs
-----

  /trunk/res/res_stasis.c 394442 
  /trunk/res/stasis/app.h 394442 
  /trunk/res/stasis/app.c 394442 

Diff: https://reviewboard.asterisk.org/r/2678/diff/


Testing
-------

Several rounds of connecting the WebSocket, putting channels in the
Stasis app, disconnecting/reconnecting the WebSocket.


Thanks,

David Lee

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130716/bae0baea/attachment-0001.htm>


More information about the asterisk-dev mailing list