Fix an inspector warning

This commit is contained in:
Trustin Lee 2014-02-17 05:25:17 -08:00
parent ab257b0ac6
commit 61bfd46264
2 changed files with 8 additions and 7 deletions

View File

@ -32,15 +32,16 @@ abstract class AbstractEpollChannel extends AbstractChannel {
volatile int fd;
int id;
AbstractEpollChannel(Channel parent, int fd, int flag) {
AbstractEpollChannel(int flag) {
this(null, socketFd(), flag, false);
}
AbstractEpollChannel(Channel parent, int fd, int flag, boolean active) {
super(parent);
this.fd = fd;
readFlag = flag;
flags |= flag;
}
AbstractEpollChannel(int flag) {
this(null, socketFd(), flag);
this.active = active;
}
private static int socketFd() {

View File

@ -47,6 +47,7 @@ import java.util.concurrent.TimeUnit;
* maximal performance.
*/
public final class EpollSocketChannel extends AbstractEpollChannel implements SocketChannel {
private final EpollSocketChannelConfig config;
/**
@ -61,8 +62,7 @@ public final class EpollSocketChannel extends AbstractEpollChannel implements So
private volatile boolean outputShutdown;
EpollSocketChannel(Channel parent, int fd) {
super(parent, fd, Native.EPOLLIN);
active = true;
super(parent, fd, Native.EPOLLIN, true);
config = new EpollSocketChannelConfig(this);
}