goutamadwant opened a new pull request, #3273:
URL: https://github.com/apache/pekko/pull/3273

   ### Motivation
   Outgoing TCP connection setup can fail before the connection actor receives 
a `ChannelRegistration`. In that path, `TcpConnection.postStop` reported 
`CommandFailed` but left the `SocketChannel` open because there was no 
registration callback available to close it.
   
   ### Modification
   Close still-open channels directly from `postStop` when no 
`ChannelRegistration` exists. Registered channels continue to use the existing 
`cancelAndClose` path.
   
   Also extend the existing connect socket option failure test to verify that 
the socket captured before the failed `beforeConnect` call is closed after 
`CommandFailed`.
   
   ### Result
   TCP setup failures before `ChannelRegistration` no longer leave the 
underlying `SocketChannel` open.
   
   ### Tests
   - `sbt "actor-tests / Test / testOnly 
org.apache.pekko.io.TcpIntegrationSpec"`
   - `sbt "actor / Compile / scalafmtCheck" "actor-tests / Test / 
scalafmtCheck"`
   - `git diff --check`
   
   ### References
   Fixes #3246


-- 
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