fix quicer

This commit is contained in:
anlicheng 2026-02-11 23:38:27 +08:00
parent 0f15f1da57
commit 8a095a9b45
2 changed files with 4 additions and 3 deletions

View File

@ -6,7 +6,7 @@
%%% @end %%% @end
%%% Created : 11. 2 2026 23:00 %%% Created : 11. 2 2026 23:00
%%%------------------------------------------------------------------- %%%-------------------------------------------------------------------
-module(sdlan_quic_conn). -module(sdlan_quic_channel).
-author("anlicheng"). -author("anlicheng").
-behaviour(gen_statem). -behaviour(gen_statem).

View File

@ -26,6 +26,7 @@ init() ->
{certfile, Path ++ "/cert.pem"}, {certfile, Path ++ "/cert.pem"},
{keyfile, Path ++ "/key.pem"}, {keyfile, Path ++ "/key.pem"},
{alpn, Alpn}, {alpn, Alpn},
{ip, {0,0,0,0}},
{peer_bidi_stream_count, 1} {peer_bidi_stream_count, 1}
], ],
{ok, L} = quicer:listen(Port, LOptions), {ok, L} = quicer:listen(Port, LOptions),
@ -36,8 +37,8 @@ loop_accept(L) ->
{ok, Conn} -> {ok, Conn} ->
case quicer:handshake(Conn) of case quicer:handshake(Conn) of
ok -> ok ->
{ok, WorkerPid} = sdlan_quic_conn:start_link(Conn), {ok, ChannelPid} = sdlan_quic_channel:start_link(Conn),
quicer:controlling_process(Conn, WorkerPid), quicer:controlling_process(Conn, ChannelPid),
loop_accept(L); loop_accept(L);
{error, _} -> {error, _} ->
quicer:close_connection(Conn), quicer:close_connection(Conn),