Fixed an assertion error where NioSocketChannel.setConnected() is called on a closed channel

This commit is contained in:
Trustin Lee 2010-01-09 08:38:12 +00:00
parent 41af2d111e
commit 052a109bc9

View File

@ -133,9 +133,10 @@ class NioSocketChannel extends AbstractChannel
}
final void setConnected() {
assert state == ST_OPEN || state == ST_BOUND : "Invalid state: " + state;
if (state != ST_CLOSED) {
state = ST_CONNECTED;
}
}
@Override
protected boolean setClosed() {