Assert ServerSocketChannel is not Blocking (#43479) (#43488)

* Assert ServerSocketChannel is not Blocking

* Relates #43387 which appears to run into blocking accept calls
This commit is contained in:
Armin Braun 2019-06-21 21:28:58 +02:00 committed by GitHub
parent 186c3122be
commit 5f87caa54c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -177,7 +177,9 @@ public abstract class ChannelFactory<ServerSocket extends NioServerSocketChannel
SocketChannel acceptNioChannel(ServerChannelContext serverContext) throws IOException {
ServerSocketChannel rawChannel = serverContext.getChannel().getRawChannel();
assert rawChannel.isBlocking() == false;
SocketChannel socketChannel = accept(rawChannel);
assert rawChannel.isBlocking() == false;
if (socketChannel == null) {
return null;
}