Skip to content
Success

Changes

Summary

  1. sctp_server: invalidate handler's Pid on 'EXIT' (details)
Commit 8ace6153a849768893e1dd109eb087895a79e77e by Vadim Yanitskiy
sctp_server: invalidate handler's Pid on 'EXIT'

An 'EXIT' signal indicates that a connection handling process is dead,
so the respective pid shall not be referenced anymore.  When this
happens, the current implementation sends an EOF to the eNB and simply
erases the respective client state from the clients dictionary.

The problem with this approach is that we're bypassing the logic
in client_del/2 and, as a result, never decrementing the
?S1GW_GAUGE_S1AP_ENB_NUM_SCTP_CONNECTIONS.  When in sctp_recv/2 we
receive a 'shutdown_comp' event and call client_del/2, the client
state is already gone.

Instead of erasing the client state on 'EXIT', invalidate handler's
pid by setting it to undefined and keep the clients dictionary intact.
Leave the task of dictionary manipulation up to client_{add,del} API.

Change-Id: I21fedf8579baa54dc1e7ade348abffd7ee9b04c4
The file was modifiedsrc/sctp_server.erl