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
%%% Created : 11. 2 2026 23:00
%%%-------------------------------------------------------------------
-module(sdlan_quic_conn).
-module(sdlan_quic_channel).
-author("anlicheng").
-behaviour(gen_statem).

View File

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