Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TESTS: Set SO_LINGER = 0 for MockNioTransport #32560

Merged
merged 7 commits into from
Sep 19, 2018
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ protected MockChannel initiateChannel(DiscoveryNode node, ActionListener<Void> c
executor.submit(() -> {
try {
socket.connect(address);
socket.setSoLinger(false, 0);
channel.loopRead(executor);
connectListener.onResponse(null);
} catch (Exception ex) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ public MockSocketChannel createChannel(NioSelector selector, SocketChannel chann
BytesChannelContext context = new BytesChannelContext(nioChannel, selector, (e) -> exceptionCaught(nioChannel, e),
readWriteHandler, new InboundChannelBuffer(pageSupplier));
nioChannel.setContext(context);
nioChannel.setSoLinger(0);
return nioChannel;
}

Expand Down