Attention is currently required from: fixeria, laforge, pespin.

fixeria uploaded patch set #2 to this change.

View Change

The following approvals got outdated and were removed: Code-Review+1 by laforge, Code-Review+1 by pespin

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 shuts the eNB association down
gracefully 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
Related: SYS#7288
---
M src/sctp_server.erl
1 file changed, 9 insertions(+), 3 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/31/39631/2

To view, visit change 39631. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: I21fedf8579baa54dc1e7ade348abffd7ee9b04c4
Gerrit-Change-Number: 39631
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>
Gerrit-Attention: laforge <laforge@osmocom.org>
Gerrit-Attention: pespin <pespin@sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy@sysmocom.de>