fix: quic listener spec
This commit is contained in:
parent
2ef2acc850
commit
eb7625a595
|
@ -135,7 +135,9 @@
|
||||||
, system_code_change/4
|
, system_code_change/4
|
||||||
]}).
|
]}).
|
||||||
|
|
||||||
-spec(start_link(esockd:transport(), esockd:socket(), emqx_channel:opts())
|
-spec(start_link(esockd:transport(),
|
||||||
|
esockd:socket() | {pid(), quicer:connection_handler()},
|
||||||
|
emqx_channel:opts())
|
||||||
-> {ok, pid()}).
|
-> {ok, pid()}).
|
||||||
start_link(Transport, Socket, Options) ->
|
start_link(Transport, Socket, Options) ->
|
||||||
Args = [self(), Transport, Socket, Options],
|
Args = [self(), Transport, Socket, Options],
|
||||||
|
|
|
@ -50,12 +50,8 @@ new_conn(Conn, S) ->
|
||||||
|
|
||||||
-spec connected(quicer:connection_handler(), cb_state()) -> {ok, cb_state()} | {error, any()}.
|
-spec connected(quicer:connection_handler(), cb_state()) -> {ok, cb_state()} | {error, any()}.
|
||||||
connected(Conn, #{slow_start := false} = S) ->
|
connected(Conn, #{slow_start := false} = S) ->
|
||||||
case emqx_connection:start_link(emqx_quic_stream, Conn, S) of
|
{ok, _Pid} = emqx_connection:start_link(emqx_quic_stream, Conn, S),
|
||||||
{ok, _Pid} ->
|
|
||||||
{ok, S};
|
{ok, S};
|
||||||
Other ->
|
|
||||||
{error, Other}
|
|
||||||
end;
|
|
||||||
connected(_Conn, S) ->
|
connected(_Conn, S) ->
|
||||||
{ok, S}.
|
{ok, S}.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue