diff --git a/apps/sdlan/src/quic/sdlan_quic_channel.erl b/apps/sdlan/src/quic/sdlan_quic_channel.erl index 63644a5..94c4847 100644 --- a/apps/sdlan/src/quic/sdlan_quic_channel.erl +++ b/apps/sdlan/src/quic/sdlan_quic_channel.erl @@ -217,6 +217,7 @@ handle_event(info, {frame, <>}, registered, handle_event(info, {frame, <>}, registered, State = #state{stream = Stream, ping_counter = PingCounter}) -> quic_send(Stream, <>), + logger:debug("[sdlan_quic_channel] get ping"), {keep_state, State#state{ping_counter = PingCounter + 1}}; handle_event(info, {timeout, _, ping_ticker}, _, State = #state{client_id = ClientId, ping_counter = PingCounter}) -> @@ -224,7 +225,7 @@ handle_event(info, {timeout, _, ping_ticker}, _, State = #state{client_id = Clie erlang:start_timer(?PING_TICKER, self(), ping_ticker), case PingCounter > 0 of true -> - {noreply, State#state{ping_counter = 0}}; + {keep_state, State#state{ping_counter = 0}}; false -> logger:debug("[sdlan_channel] client_id: ~p, ping losted", [ClientId]), {stop, normal, State#state{ping_counter = 0}}