Skip to content

Commit

Permalink
Remove "foo" from keepalive
Browse files Browse the repository at this point in the history
  • Loading branch information
jjcarstens committed Apr 29, 2020
1 parent 92b0fd9 commit e87a262
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/websocket_client.erl
Expand Up @@ -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)}}%%;
Expand Down
2 changes: 1 addition & 1 deletion test/wc_SUITE.erl
Expand Up @@ -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.

Expand Down

0 comments on commit e87a262

Please sign in to comment.