format
All checks were successful
ci/woodpecker/push/release Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pr/release Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
All checks were successful
ci/woodpecker/push/release Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pr/release Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
This commit is contained in:
parent
e9b7d2409f
commit
f459a12a5a
1 changed files with 1 additions and 0 deletions
|
@ -64,6 +64,7 @@ def websocket_handle(:pong, state) do
|
|||
|
||||
# We only receive pings for now
|
||||
def websocket_handle(:ping, state), do: {:ok, state}
|
||||
|
||||
def websocket_handle({:text, "ping"}, state) do
|
||||
if state.timer, do: Process.cancel_timer(state.timer)
|
||||
{:reply, {:text, "pong"}, %{state | timer: timer()}}
|
||||
|
|
Loading…
Reference in a new issue