fixeria submitted this change.
sctp_server: fix state in catch-all handle_call()
Sending an unexpected call breaks the server, because the third member
of a returned tuple (not_implemented) becomes the new state. It was
actually meant to be part of the Reply - fix this.
https://www.erlang.org/doc/apps/stdlib/gen_server.html#c:handle_call/3
{reply, Reply :: term(), NewState :: term()}
Change-Id: I1cc683e549c3bb61e3e4c45bb3d244202d61be53
---
M src/sctp_server.erl
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/src/sctp_server.erl b/src/sctp_server.erl
index e93dd9f..806c559 100644
--- a/src/sctp_server.erl
+++ b/src/sctp_server.erl
@@ -95,7 +95,7 @@
handle_call(Info, _From, State) ->
error_logger:error_report(["unknown handle_call()",
{module, ?MODULE}, {info, Info}, {state, State}]),
- {reply, error, not_implemented}.
+ {reply, {error, not_implemented}, State}.
handle_cast({send_data, Aid, Data}, State) ->
To view, visit change 37218. To unsubscribe, or for help writing mail filters, visit settings.