mirror of
https://github.com/corda/corda.git
synced 2025-06-14 21:28:14 +00:00
avoid EAGAIN or EWOULDBLOCK errors due to SocketSelector.wakup being called many times between calls to select
This commit is contained in:
@ -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();
|
||||||
|
Reference in New Issue
Block a user