diff options
Diffstat (limited to 'test/handlers/ws_terminate_h.erl')
| -rw-r--r-- | test/handlers/ws_terminate_h.erl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/handlers/ws_terminate_h.erl b/test/handlers/ws_terminate_h.erl index 12e6d1a..a6cdbe5 100644 --- a/test/handlers/ws_terminate_h.erl +++ b/test/handlers/ws_terminate_h.erl @@ -21,7 +21,10 @@ init(Req, _) -> end, {cowboy_websocket, Req, #state{pid=Pid}, Opts}. -websocket_init(State) -> +websocket_init(State=#state{pid=Pid}) -> + Pid ! {ws_pid, self()}, + %% We must trap 'EXIT' signals for HTTP/2 to call terminate/3. + process_flag(trap_exit, true), {ok, State}. websocket_handle(_, State) -> |
