jack2012aa opened a new pull request, #20300:
URL: https://github.com/apache/kafka/pull/20300

   ## Description
   `Processor` and `Acceptor` in `SocketServer` may produce a race condition 
when a processor was closed but its acceptor assigns a socket channel to it. 
The channel will remain open, which is a leak.
   
   ## Change
   `Processor` now checks the `shouldRun` value before it accepts a channel. 
`Acceptor` closes the refused channel.
   
   ## Test
   Added a unit test that shutdowns processors externally to introduce the race 
condition, and checks status of socket channels.


-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to