aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/dtls_connection.erl
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2019-02-06 12:29:30 +0100
committerRaimo Niskanen <[email protected]>2019-02-13 14:18:20 +0100
commitbdcfbe7966328a07814c301787173b80e5c20aa6 (patch)
tree71b7db0091ad73967be207533a1d71dc329bb217 /lib/ssl/src/dtls_connection.erl
parent86c4a2f9da3de486095d029fc0e66a4fa3b66fca (diff)
downloadotp-bdcfbe7966328a07814c301787173b80e5c20aa6.tar.gz
otp-bdcfbe7966328a07814c301787173b80e5c20aa6.tar.bz2
otp-bdcfbe7966328a07814c301787173b80e5c20aa6.zip
Optimize read_application_data with Okasaki queue
To avoid degenerate case with quadratic complexity that shows up when sending large messages since the the fragment concatenation was done by binary append. An Okasaki queue is much more efficient.
Diffstat (limited to 'lib/ssl/src/dtls_connection.erl')
-rw-r--r--lib/ssl/src/dtls_connection.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ssl/src/dtls_connection.erl b/lib/ssl/src/dtls_connection.erl
index 7a91578fe2..e24961186d 100644
--- a/lib/ssl/src/dtls_connection.erl
+++ b/lib/ssl/src/dtls_connection.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2018. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2019. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -805,7 +805,7 @@ initial_state(Role, Host, Port, Socket, {SSLOptions, SocketOptions, _}, User,
session = #session{is_resumable = new},
connection_states = ConnectionStates,
protocol_buffers = #protocol_buffers{},
- user_data_buffer = <<>>,
+ user_data_buffer = {[],0,[]},
start_or_recv_from = undefined,
flight_buffer = new_flight(),
protocol_specific = #{flight_state => initial_flight_state(DataTag)}