Skip to content

Commit

Permalink
Augment explanation for the local use of erpc:call
Browse files Browse the repository at this point in the history
  • Loading branch information
juhlig committed Jul 4, 2024
1 parent d9a9521 commit b2bbc49
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ranch.erl
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ start_error(_, Error) -> Error.

-spec stop_listener(ref()) -> ok | {error, not_found}.
stop_listener(Ref) ->
%% The stop procedure must be executed in a separate
%% process to make sure that it won't be interrupted
%% in the middle in case the calling process crashes.
%% We use erpc:call locally so we don't have to
%% implement a custom spawn/call mechanism.
%% We need to provide an integer timeout to erpc:call,
%% otherwise the function will be executed in the calling
%% process. 5 minutes should be enough.
Expand Down

0 comments on commit b2bbc49

Please sign in to comment.