This commit is contained in:
anlicheng 2026-02-18 23:48:04 +08:00
parent 9c81a7c2be
commit 1ad809aa94

View File

@ -233,12 +233,12 @@ handle_event(info, {quic, send_shutdown_complete, Stream, _Props}, _StateName, S
%% quicer相关的信息, frame消息
handle_event(info, {quic, Data, Stream, _Props}, _StateName, State = #state{stream = Stream, buf = Buf, max_packet_size = MaxPacketSize}) ->
logger:debug("[sdlan_quic_channel] get message: ~p", [Data]),
case decode_frames(<<Buf/binary, Data/binary>>, MaxPacketSize) of
{error, Reason} ->
{stop, Reason, State};
{ok, NBuf, Frames} ->
Actions = [{next_event, info, {frame, Frame}} || Frame <- Frames],
logger:debug("[sdlan_quic_channel] get frames: ~p", [Frames]),
{keep_state, State#state{buf = NBuf}, Actions}
end;