pjfanning commented on code in PR #3019:
URL: https://github.com/apache/pekko/pull/3019#discussion_r3330310971


##########
stream/src/main/scala/org/apache/pekko/stream/impl/io/TlsGraphStage.scala:
##########
@@ -135,15 +129,20 @@ import pekko.util.ByteString
       private def allocateBuffers(session: SSLSession): Unit = {
         val packetSize = math.max(1, session.getPacketBufferSize)
         val applicationSize = math.max(1, session.getApplicationBufferSize)
-        val applicationBatchSize = applicationBufferSize(applicationSize, 
packetSize)
         transportPacketSize = packetSize
         applicationRecordSize = applicationSize
-        maxUserInBufferSize = applicationBatchSize
-        maxUserOutBufferSize = applicationBatchSize
-
-        transportOutBuffer = acquireTransportBuffer(packetSize)
-        transportInBuffer = acquireTransportBuffer(packetSize)
-        transportUnreadBuffer = acquireTransportBuffer(packetSize)
+        maxUserInBufferSize = applicationSize * 
MaxApplicationRecordsPerEngineCall
+        maxUserOutBufferSize = applicationSize * 
MaxApplicationRecordsPerEngineCall
+        maxTransportOutBufferSize = packetSize * 
MaxApplicationRecordsPerEngineCall

Review Comment:
   use java.lang.Math.multiplyExact



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to