Menu ▾ ▴

#41 Server not notified of chan disconnect

1_-_Severe_Bug
open
nobody
5
2001-05-04
2001-05-04
Anonymous
No

This is detected in relay-20010408

If you join channel #A, then disconnect and join #B,
then disconnect and join #A again, the Server ignores
your JOIN command, thinking that you're still connected
to #A

The problem is that Channel.setConnected() calls
ChannelListener.onConnect() even when the argument is
false. Solution is to replace Channel.setConnected()
with the following (not tested)

void setConnected(boolean value) {

_isConnected = value;

final ChannelEvent event2 = new
ChannelEvent(Channel.this);

if (value) {
notifyListeners(new _ChannelEventNotifier() {
public void notify(ChannelListener listener)
{listener.onConnect(event2);}
});
}
else {
notifyListeners(new _ChannelEventNotifier() {
public void notify(ChannelListener listener)
{listener.onDisonnect(event2);}
});
}
}

Discussion


Log in to post a comment.