mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Ensure HTTP/1.1 Websocket resets the trap_exit flag
While we are identified as a supervisor in the tree, we no longer manage children processes at that point, so do not need to trap exit signals. Users can still enable trap_exit if they prefer to.
This commit is contained in:
parent
9784179498
commit
c1490d7d55
5 changed files with 17 additions and 2 deletions
|
@ -36,7 +36,10 @@ do_websocket_init(State=reply_many_hibernate) ->
|
|||
do_websocket_init(State=reply_many_close) ->
|
||||
{[{text, "Hello"}, close], State};
|
||||
do_websocket_init(State=reply_many_close_hibernate) ->
|
||||
{[{text, "Hello"}, close], State, hibernate}.
|
||||
{[{text, "Hello"}, close], State, hibernate};
|
||||
do_websocket_init(State=reply_trap_exit) ->
|
||||
Text = "trap_exit: " ++ atom_to_list(element(2, process_info(self(), trap_exit))),
|
||||
{[{text, Text}, close], State, hibernate}.
|
||||
|
||||
websocket_handle(_, State) ->
|
||||
{[], State}.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue