Fixed issue: NETTY-28 (Channel.compareTo() can return 0 for different channels.)
* Changed AbstractChannel.compareTo(Channel) to use the id of the channels instead of the identity hash codes
This commit is contained in:
parent
6ff5a87d01
commit
b4d84ce73b
@ -94,8 +94,8 @@ public abstract class AbstractChannel implements Channel, Comparable<Channel> {
|
|||||||
return this == o;
|
return this == o;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int compareTo(Channel o) {
|
public final int compareTo(Channel o) {
|
||||||
return System.identityHashCode(this) - System.identityHashCode(o);
|
return getId().compareTo(o.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isOpen() {
|
public boolean isOpen() {
|
||||||
|
Loading…
Reference in New Issue
Block a user