Skip to content

Commit 6275a79

Browse files
committed
chore: remove dead code and fix spec
1 parent 4b44430 commit 6275a79

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

src/quicer.erl

+4-13
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@
165165
new_conn_props/0,
166166
streams_available_props/0,
167167
new_stream_props/0,
168+
dgram_state/0,
168169

169170
%% Suporting types
170171
error_code/0,
@@ -371,9 +372,8 @@ close_listener(Listener, Timeout) ->
371372
timeout()
372373
) ->
373374
{ok, connection_handle()}
374-
| {error, conn_open_error | config_error | conn_start_error}
375-
| {error, timeout}
376-
| {error, nst_not_found}.
375+
| {error, conn_open_error | config_error | conn_start_error | timeout | nst_not_found}
376+
| {error, transport_down, transport_shutdown_props()}.
377377
connect(Host, Port, Opts, Timeout) when is_list(Opts) ->
378378
connect(Host, Port, maps:from_list(Opts), Timeout);
379379
connect(Host, Port, Opts, Timeout) when is_tuple(Host) ->
@@ -391,21 +391,12 @@ connect(Host, Port, Opts, Timeout) when is_map(Opts) ->
391391
receive
392392
{quic, connected, H, _} ->
393393
{ok, H};
394-
{quic, transport_shutdown, H, Reason} when
395-
Reason == connection_timeout orelse
396-
Reason == connection_idle
397-
->
398-
flush(closed, H),
399-
{error, timeout};
400394
{quic, transport_shutdown, H, Reason} ->
401395
flush(closed, H),
402396
{error, transport_down, Reason}
403397
end;
404398
{error, _} = Err ->
405-
Err;
406-
{error, not_found, _} ->
407-
%% nst error
408-
{error, nst_not_found}
399+
Err
409400
end.
410401

411402
%% @doc

0 commit comments

Comments
 (0)