mirror of
https://github.com/corda/corda.git
synced 2025-02-11 05:12:09 +00:00
avoid EAGAIN or EWOULDBLOCK errors due to SocketSelector.wakup being called many times between calls to select
This commit is contained in:
parent
e825da60aa
commit
ef00ff80ef
@ -65,7 +65,7 @@ class SocketSelector extends Selector {
|
|||||||
public int doSelect(long interval) throws IOException {
|
public int doSelect(long interval) throws IOException {
|
||||||
selectedKeys.clear();
|
selectedKeys.clear();
|
||||||
|
|
||||||
if (clearWoken()) return 0;
|
if (clearWoken()) interval = -1;
|
||||||
|
|
||||||
int max=0;
|
int max=0;
|
||||||
for (Iterator<SelectionKey> it = keys.iterator();
|
for (Iterator<SelectionKey> it = keys.iterator();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user