Skip to content

Commit

Permalink
Assert ServerSocketChannel is not Blocking (#43479) (#43488)
Browse files Browse the repository at this point in the history
* Assert ServerSocketChannel is not Blocking

* Relates #43387 which appears to run into blocking accept calls
  • Loading branch information
original-brownbear authored Jun 21, 2019
1 parent 186c312 commit 5f87caa
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ SocketChannel openNioChannel(InetSocketAddress remoteAddress) throws IOException

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;
}
Expand Down

0 comments on commit 5f87caa

Please sign in to comment.