From e87a2629c4f9e671c39f73740b6b220795965894 Mon Sep 17 00:00:00 2001 From: Jon Carstens Date: Wed, 29 Apr 2020 09:35:30 -0600 Subject: [PATCH] Remove "foo" from keepalive --- src/websocket_client.erl | 2 +- test/wc_SUITE.erl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/websocket_client.erl b/src/websocket_client.erl index 79d2b6b..c660f4a 100644 --- a/src/websocket_client.erl +++ b/src/websocket_client.erl @@ -424,7 +424,7 @@ handle_keepalive(KAState, #context{ wsreq=WSReq, ka_attempts=KAAttempts }=Contex _ -> % case encode_and_send({ping, <<"foo">>}, WSReq) of % ok -> - ok = encode_and_send({ping, <<"foo">>}, WSReq), + ok = encode_and_send(ping, WSReq), NewTimer = erlang:send_after(KeepAlive, self(), keepalive), WSReq1 = websocket_req:set([{keepalive_timer, NewTimer}], WSReq), {next_state, KAState, Context#context{wsreq=WSReq1, ka_attempts=(KAAttempts+1)}}%%; diff --git a/test/wc_SUITE.erl b/test/wc_SUITE.erl index f538692..d000b05 100644 --- a/test/wc_SUITE.erl +++ b/test/wc_SUITE.erl @@ -137,7 +137,7 @@ test_bad_request(_) -> test_keepalive_opt(_) -> {ok, Pid} = ws_client:start_link("ws://localhost:8080", 100), receive {ok, Pid} -> ok after 500 -> ct:fail(timeout) end, - {pong, <<"foo">>} = ws_client:recv(Pid, 500), + {pong, <<>>} = ws_client:recv(Pid, 500), ws_client:stop(Pid), ok.