From 1e41829bf7abeec268b9a409f35051ed7f4e0090 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Sun, 18 Feb 2024 10:33:00 +0100 Subject: [PATCH] in TlsActor flush data to user only after handshake has finished (#1128) Co-authored-by: Johannes Rudolph --- .../main/scala/org/apache/pekko/stream/impl/io/TLSActor.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/io/TLSActor.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/io/TLSActor.scala index 4d9087cedf6..41c4ecd7db7 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/io/TLSActor.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/io/TLSActor.scala @@ -420,7 +420,6 @@ import pekko.util.ByteString case OK => result.getHandshakeStatus match { case NEED_WRAP => - flushToUser() // https://github.com/apache/incubator-pekko/issues/442 // A second workaround for an infinite loop we have not been able to reproduce/isolate, // if you see this, and can reproduce consistently, please report back to the Apache Pekko team @@ -480,6 +479,7 @@ import pekko.util.ByteString case Success(()) => currentSession = session corkUser = false + flushToUser() case Failure(ex) => fail(ex, closeTransport = true) }