mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-15 04:30:25 +00:00
Get rid of stray messages when killing HTTP/2 request processes
This commit is contained in:
parent
061cc227b1
commit
b7210d6d1a
1 changed files with 3 additions and 0 deletions
|
@ -693,6 +693,9 @@ stream_call_terminate(StreamID, Reason, StreamState) ->
|
|||
stream_terminate_children([], _, Acc) ->
|
||||
Acc;
|
||||
stream_terminate_children([{Pid, StreamID}|Tail], StreamID, Acc) ->
|
||||
%% We unlink and flush the mailbox to avoid receiving a stray message.
|
||||
unlink(Pid),
|
||||
receive {'EXIT', Pid, _} -> ok after 0 -> ok end,
|
||||
exit(Pid, kill),
|
||||
stream_terminate_children(Tail, StreamID, Acc);
|
||||
stream_terminate_children([Child|Tail], StreamID, Acc) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue