Skip to content

Commit 48aa716

Browse files
Assert ServerSocketChannel is not Blocking (#43479)
* Assert ServerSocketChannel is not Blocking * Relates #43387 which appears to run into blocking accept calls
1 parent c1c2ce3 commit 48aa716

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libs/nio/src/main/java/org/elasticsearch/nio/ChannelFactory.java

+2
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,9 @@ SocketChannel openNioChannel(InetSocketAddress remoteAddress) throws IOException
177177

178178
SocketChannel acceptNioChannel(ServerChannelContext serverContext) throws IOException {
179179
ServerSocketChannel rawChannel = serverContext.getChannel().getRawChannel();
180+
assert rawChannel.isBlocking() == false;
180181
SocketChannel socketChannel = accept(rawChannel);
182+
assert rawChannel.isBlocking() == false;
181183
if (socketChannel == null) {
182184
return null;
183185
}

0 commit comments

Comments
 (0)