[ https://issues.apache.org/jira/browse/ARIES-2119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17849748#comment-17849748 ]
ASF subversion and git services commented on ARIES-2119: -------------------------------------------------------- Commit 8795cde0cabf4c56644083dade04cb6f6821ed66 in aries-rsa's branch refs/heads/master from Amichai Rothman [ https://gitbox.apache.org/repos/asf?p=aries-rsa.git;h=8795cde0 ] ARIES-2119 - Fix TCPServer concurrency > TCPServer concurrency issue when accepting sockets > -------------------------------------------------- > > Key: ARIES-2119 > URL: https://issues.apache.org/jira/browse/ARIES-2119 > Project: Aries > Issue Type: Bug > Components: Remote Service Admin > Affects Versions: rsa-1.16.1 > Reporter: Amichai Rothman > Priority: Major > > Currently the TCPServer spawns multiple threads, and all of them call > ServerSocket.accept() concurrently, however this class is not thread-safe. > JDK-8278270 implies this is fixed in OpenJDK 18, however the ServerSocket API > documentation has no mention of this so it's likely a specific implementation > detail and not a guarantee. > In any case, it's a non-conventional idiom - the common pattern is to have a > single thread calling accept in a loop, then handing the accepted sockets > over to other threads for handling the connections. > In addition, the running flag accessed by all of the threads is not > thread-safe either. It should at least be volatile. -- This message was sent by Atlassian Jira (v8.20.10#820010)