From 4a58077d5162325fa5723690e58e7364adbcb18c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 12 Nov 2020 14:00:41 +0100 Subject: Replace gun:ws_send/2 with gun:ws_send/3 Switching from /2 to /3 should be easy enough. Also update the documentation about HTTP/2 Websocket support. --- test/shutdown_SUITE.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/shutdown_SUITE.erl') diff --git a/test/shutdown_SUITE.erl b/test/shutdown_SUITE.erl index 27e9f4b..3b3ddf2 100644 --- a/test/shutdown_SUITE.erl +++ b/test/shutdown_SUITE.erl @@ -534,7 +534,7 @@ ws_gun_send_close_frame(Config) -> %% We send a close frame. We expect the same frame back %% before the connection is closed. Frame = {close, 3333, <<>>}, - gun:ws_send(ConnPid, Frame), + gun:ws_send(ConnPid, StreamRef, Frame), {ws, Frame} = gun:await(ConnPid, StreamRef), gun_is_down(ConnPid, ConnRef, normal). @@ -563,7 +563,7 @@ closing_gun_shutdown(Config) -> %% We send a close frame then immediately call gun:shutdown/1. %% We expect Gun to go down without retrying to reconnect. Frame = {close, 3333, <<>>}, - gun:ws_send(ConnPid, Frame), + gun:ws_send(ConnPid, StreamRef, Frame), gun:shutdown(ConnPid), {ws, Frame} = gun:await(ConnPid, StreamRef), gun_is_down(ConnPid, ConnRef, shutdown). @@ -586,7 +586,7 @@ do_closing_owner_down(Config, ExitReason, DownReason) -> {ok, http} = gun:await_up(ConnPid), StreamRef = gun:ws_upgrade(ConnPid, "/ws_frozen", []), {upgrade, [<<"websocket">>], _} = gun:await(ConnPid, StreamRef), - gun:ws_send(ConnPid, {close, 3333, <<>>}), + gun:ws_send(ConnPid, StreamRef, {close, 3333, <<>>}), timer:sleep(100), exit(ExitReason) end), -- cgit v1.2.3