Correctly set EPOLLRDHUP for all stream channels.
Motivation:
Fix regression introduced by 585ce1593f
, which missed to set EPOLLRDHUP for all stream channels.
Modifications:
Correctly set EPOLLRDHUP for all stream channels in the AbstractEpollStreamChannel constructor.
Result:
No more test failures in EpollDomain*Channel tests.
This commit is contained in:
parent
720faa4df1
commit
730ec357d2
@ -51,10 +51,14 @@ public abstract class AbstractEpollStreamChannel extends AbstractEpollChannel {
|
||||
|
||||
protected AbstractEpollStreamChannel(Channel parent, int fd) {
|
||||
super(parent, fd, Native.EPOLLIN, true);
|
||||
// Add EPOLLRDHUP so we are notified once the remote peer close the connection.
|
||||
flags |= Native.EPOLLRDHUP;
|
||||
}
|
||||
|
||||
protected AbstractEpollStreamChannel(int fd) {
|
||||
super(fd, Native.EPOLLIN);
|
||||
// Add EPOLLRDHUP so we are notified once the remote peer close the connection.
|
||||
flags |= Native.EPOLLRDHUP;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -37,8 +37,6 @@ public final class EpollSocketChannel extends AbstractEpollStreamChannel impleme
|
||||
|
||||
EpollSocketChannel(Channel parent, int fd) {
|
||||
super(parent, fd);
|
||||
// Add EPOLLRDHUP so we are notified once the remote peer close the connection.
|
||||
flags |= Native.EPOLLRDHUP;
|
||||
config = new EpollSocketChannelConfig(this);
|
||||
// Directly cache the remote and local addresses
|
||||
// See https://github.com/netty/netty/issues/2359
|
||||
@ -48,8 +46,6 @@ public final class EpollSocketChannel extends AbstractEpollStreamChannel impleme
|
||||
|
||||
public EpollSocketChannel() {
|
||||
super(Native.socketStreamFd());
|
||||
// Add EPOLLRDHUP so we are notified once the remote peer close the connection.
|
||||
flags |= Native.EPOLLRDHUP;
|
||||
config = new EpollSocketChannelConfig(this);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user