fix(quic): handle timeout event in data stream
This commit is contained in:
parent
38247a9d62
commit
d8fa65ea09
|
@ -280,6 +280,9 @@ handle_info({'EXIT', Pid, Reason}, #{streams := Streams} = S) ->
|
||||||
Reason =:= killed
|
Reason =:= killed
|
||||||
->
|
->
|
||||||
{ok, S};
|
{ok, S};
|
||||||
|
true ->
|
||||||
|
?SLOG(info, #{message => "Data stream unexpected exit", reason => Reason}),
|
||||||
|
{ok, S};
|
||||||
false ->
|
false ->
|
||||||
{stop, unknown_pid_down, S}
|
{stop, unknown_pid_down, S}
|
||||||
end.
|
end.
|
||||||
|
|
|
@ -233,7 +233,11 @@ do_handle_appl_msg({event, updated}, S) ->
|
||||||
|
|
||||||
handle_info(Deliver = {deliver, _, _}, S) ->
|
handle_info(Deliver = {deliver, _, _}, S) ->
|
||||||
Delivers = [Deliver],
|
Delivers = [Deliver],
|
||||||
with_channel(handle_deliver, [Delivers], S).
|
with_channel(handle_deliver, [Delivers], S);
|
||||||
|
handle_info({timeout, Ref, Msg}, S) ->
|
||||||
|
with_channel(handle_timeout, [Ref, Msg], S);
|
||||||
|
handle_info(Info, State) ->
|
||||||
|
with_channel(handle_info, [Info], State).
|
||||||
|
|
||||||
with_channel(Fun, Args, #{channel := Channel, task_queue := Q} = S) when
|
with_channel(Fun, Args, #{channel := Channel, task_queue := Q} = S) when
|
||||||
Channel =/= undefined
|
Channel =/= undefined
|
||||||
|
|
Loading…
Reference in New Issue