Fixed an assertion error where NioSocketChannel.setConnected() is called on a closed channel
This commit is contained in:
parent
41af2d111e
commit
052a109bc9
@ -133,9 +133,10 @@ class NioSocketChannel extends AbstractChannel
|
|||||||
}
|
}
|
||||||
|
|
||||||
final void setConnected() {
|
final void setConnected() {
|
||||||
assert state == ST_OPEN || state == ST_BOUND : "Invalid state: " + state;
|
if (state != ST_CLOSED) {
|
||||||
state = ST_CONNECTED;
|
state = ST_CONNECTED;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean setClosed() {
|
protected boolean setClosed() {
|
||||||
|
Loading…
Reference in New Issue
Block a user