mirror of
https://github.com/corda/corda.git
synced 2025-01-23 12:58:35 +00:00
avoid crash when Selector.close is called more than once on the same instance
This commit is contained in:
parent
222b357089
commit
807f2a8d51
@ -106,8 +106,11 @@ class SocketSelector extends Selector {
|
|||||||
return selectedKeys.size();
|
return selectedKeys.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void close() {
|
public synchronized void close() {
|
||||||
natClose(state);
|
if (isOpen()) {
|
||||||
|
natClose(state);
|
||||||
|
state = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static native long natInit();
|
private static native long natInit();
|
||||||
|
Loading…
Reference in New Issue
Block a user