Skip to content

Commit 423053e

Browse files
committed
Merge branch 'maint'
* maint: ssl: Fix windows IOCP socket path
2 parents 7ca8d92 + aa280ad commit 423053e

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

lib/ssl/src/tls_sender.erl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -685,10 +685,14 @@ do_async_send(Transport, Socket, Handle, Nextstate, Result,
685685
{keep_state_and_data, []};
686686
{completion, _} ->
687687
BuffSz = iolist_size(MsgQ),
688+
#async{low = OldLow} = Async0,
688689
#async{high = High} = Async1 = new_async(StateData),
689690
Sent = sent_data(completion, BuffSz),
690-
Async = Async1#async{q_rev = [MsgQ], size = BuffSz, sent = Sent},
691-
case BuffSz < High of
691+
%% Low = 0 is used as a marker for (renegotiate, alert, post_handshake_data) events
692+
%% to keep the sender in async_wait until the buffer fully drains,
693+
%% thus preserve old 'OldLow'
694+
Async = Async1#async{q_rev = [MsgQ], size = BuffSz, sent = Sent, low = OldLow},
695+
case OldLow > 0 andalso BuffSz < High of
692696
true ->
693697
send_reply(From, ok),
694698
{next_state, Nextstate, StateData#data{buff = Async}};

0 commit comments

Comments
 (0)