diff options
Diffstat (limited to 'lib/ssl/src/dtls_packet_demux.erl')
-rw-r--r-- | lib/ssl/src/dtls_packet_demux.erl | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/ssl/src/dtls_packet_demux.erl b/lib/ssl/src/dtls_packet_demux.erl index 4945ef3c10..092366b7c0 100644 --- a/lib/ssl/src/dtls_packet_demux.erl +++ b/lib/ssl/src/dtls_packet_demux.erl @@ -298,16 +298,7 @@ do_set_emulated_opts([], Opts) -> do_set_emulated_opts([{mode, Value} | Rest], Opts) -> do_set_emulated_opts(Rest, Opts#socket_options{mode = Value}); do_set_emulated_opts([{active, N0} | Rest], Opts=#socket_options{active = Active}) when is_integer(N0) -> - N = case Active of - N1 when is_integer(N1), N0 + N1 =< 0 -> - false; - N1 when is_integer(N1) -> - N0 + N1; - _ when N0 =< 0 -> - false; - _ -> - N0 - end, + N = tls_socket:update_active_n(N0, Active), do_set_emulated_opts(Rest, Opts#socket_options{active = N}); do_set_emulated_opts([{active, Value} | Rest], Opts) -> do_set_emulated_opts(Rest, Opts#socket_options{active = Value}). |