ChannelGroup.write() should not write to a server channel
This commit is contained in:
parent
ad320f6cae
commit
8eb2d8eb43
@ -262,11 +262,11 @@ public class DefaultChannelGroup extends AbstractSet<Channel> implements Channel
|
||||
new LinkedHashMap<Integer, ChannelFuture>(size());
|
||||
if (message instanceof ChannelBuffer) {
|
||||
ChannelBuffer buf = (ChannelBuffer) message;
|
||||
for (Channel c: this) {
|
||||
for (Channel c: nonServerChannels.values()) {
|
||||
futures.put(c.getId(), c.write(buf.duplicate()));
|
||||
}
|
||||
} else {
|
||||
for (Channel c: this) {
|
||||
for (Channel c: nonServerChannels.values()) {
|
||||
futures.put(c.getId(), c.write(message));
|
||||
}
|
||||
}
|
||||
@ -279,11 +279,11 @@ public class DefaultChannelGroup extends AbstractSet<Channel> implements Channel
|
||||
new LinkedHashMap<Integer, ChannelFuture>(size());
|
||||
if (message instanceof ChannelBuffer) {
|
||||
ChannelBuffer buf = (ChannelBuffer) message;
|
||||
for (Channel c: this) {
|
||||
for (Channel c: nonServerChannels.values()) {
|
||||
futures.put(c.getId(), c.write(buf.duplicate(), remoteAddress));
|
||||
}
|
||||
} else {
|
||||
for (Channel c: this) {
|
||||
for (Channel c: nonServerChannels.values()) {
|
||||
futures.put(c.getId(), c.write(message, remoteAddress));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user