Skip to content

Commit

Permalink
ssl: Fix retransmission timeout
Browse files Browse the repository at this point in the history
Set the upper limit of the retransmission timeout to 60 seconds
instead of 60 milliseconds.

Change-Id: I17168a015f352d2526935ea77a8aea686944ebcd
  • Loading branch information
peterdmv committed Mar 29, 2019
1 parent 4358bd7 commit c738a4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ssl/src/dtls_connection.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1075,10 +1075,10 @@ start_retransmision_timer(Timeout, #state{protocol_specific = PS} = State) ->
{State#state{protocol_specific = PS#{flight_state => {retransmit, new_timeout(Timeout)}}},
[{state_timeout, Timeout, flight_retransmission_timeout}]}.

new_timeout(N) when N =< 30 ->
new_timeout(N) when N =< 30000 ->
N * 2;
new_timeout(_) ->
60.
60000.

send_handshake_flight(#state{static_env = #static_env{socket = Socket,
transport_cb = Transport},
Expand Down

0 comments on commit c738a4b

Please sign in to comment.