Use different EventLoopGroup for AIO transport tests
- plus tiny cleanup
This commit is contained in:
parent
0a99a33540
commit
9c17304755
@ -54,10 +54,11 @@ final class SocketTestPermutation {
|
||||
sbfs.add(new Factory<ServerBootstrap>() {
|
||||
@Override
|
||||
public ServerBootstrap newInstance() {
|
||||
AioEventLoopGroup loop = new AioEventLoopGroup();
|
||||
AioEventLoopGroup parentGroup = new AioEventLoopGroup();
|
||||
AioEventLoopGroup childGroup = new AioEventLoopGroup();
|
||||
return new ServerBootstrap().
|
||||
group(loop).
|
||||
channel(new AioServerSocketChannel(loop));
|
||||
group(parentGroup, childGroup).
|
||||
channel(new AioServerSocketChannel(parentGroup, childGroup));
|
||||
}
|
||||
});
|
||||
sbfs.add(new Factory<ServerBootstrap>() {
|
||||
|
@ -43,7 +43,7 @@ public class AioServerSocketChannel extends AbstractAioChannel implements Server
|
||||
private final AioEventLoopGroup childGroup;
|
||||
private final AioServerSocketChannelConfig config;
|
||||
private boolean closed;
|
||||
private AtomicBoolean readSuspended = new AtomicBoolean();
|
||||
private final AtomicBoolean readSuspended = new AtomicBoolean();
|
||||
|
||||
private final Runnable acceptTask = new Runnable() {
|
||||
|
||||
@ -68,7 +68,7 @@ public class AioServerSocketChannel extends AbstractAioChannel implements Server
|
||||
public AioServerSocketChannel(AioEventLoopGroup parentGroup, AioEventLoopGroup childGroup) {
|
||||
super(null, null, parentGroup, newSocket(parentGroup.group));
|
||||
this.childGroup = childGroup;
|
||||
this.config = new AioServerSocketChannelConfig(javaChannel());
|
||||
config = new AioServerSocketChannelConfig(javaChannel());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user