@@ -296,17 +296,10 @@ hello(internal, {handshake, {#client_hello{cookie = <<>>} = Handshake, _}}, Stat
296296 {next_state , ? STATE (hello ), State , [{next_event , internal , Handshake }]};
297297hello (internal , # change_cipher_spec {type = <<1 >>}, State0 ) ->
298298 Epoch = dtls_gen_connection :retransmit_epoch (? STATE (hello ), State0 ),
299- {State1 , Actions0 } =
299+ {State , _ } =
300300 dtls_gen_connection :send_handshake_flight (State0 , Epoch ),
301- % % This will reset the retransmission timer by repeating the enter state event
302- case dtls_gen_connection :next_event (? STATE (hello ), no_record , State1 , Actions0 ) of
303- {next_state , ? FUNCTION_NAME , State , Actions } ->
304- {repeat_state , State , Actions };
305- {next_state , ? FUNCTION_NAME , State } ->
306- {repeat_state , State };
307- {stop , _ , _ } = Stop ->
308- Stop
309- end ;
301+ % % Just retransmit and reset timer, don't process buffered records
302+ {repeat_state , State };
310303hello (internal , {protocol_record , # ssl_tls {type = ? APPLICATION_DATA }},
311304 # state {handshake_env = # handshake_env {renegotiation = {false , first }}} = State ) ->
312305 Alert = ? ALERT_REC (? FATAL , ? UNEXPECTED_MESSAGE , application_data_before_initial_handshake ),
@@ -362,16 +355,9 @@ certify(enter, _, State0) ->
362355 {keep_state , State , Actions };
363356certify (internal , # change_cipher_spec {type = <<1 >>}, State0 ) ->
364357 Epoch = dtls_gen_connection :retransmit_epoch (? STATE (certify ), State0 ),
365- {State1 , Actions0 } = dtls_gen_connection :send_handshake_flight (State0 , Epoch ),
366- % % This will reset the retransmission timer by repeating the enter state event
367- case dtls_gen_connection :next_event (? STATE (certify ), no_record , State1 , Actions0 ) of
368- {next_state , ? FUNCTION_NAME , State , Actions } ->
369- {repeat_state , State , Actions };
370- {next_state , ? FUNCTION_NAME , State } ->
371- {repeat_state , State , Actions0 };
372- {stop , _ , _ } = Stop ->
373- Stop
374- end ;
358+ {State , _ } = dtls_gen_connection :send_handshake_flight (State0 , Epoch ),
359+ % % Just retransmit and reset timer, don't process buffered records
360+ {repeat_state , State };
375361certify (state_timeout , Event , State ) ->
376362 dtls_gen_connection :handle_state_timeout (Event , ? STATE (certify ), State );
377363certify (internal , {protocol_record , # ssl_tls {type = ? APPLICATION_DATA }},
0 commit comments