avoid EAGAIN or EWOULDBLOCK errors due to SocketSelector.wakup being called many times between calls to select

This commit is contained in:
Joel Dice 2009-10-30 08:55:55 -06:00
parent e825da60aa
commit ef00ff80ef

View File

@ -65,7 +65,7 @@ class SocketSelector extends Selector {
public int doSelect(long interval) throws IOException {
selectedKeys.clear();
if (clearWoken()) return 0;
if (clearWoken()) interval = -1;
int max=0;
for (Iterator<SelectionKey> it = keys.iterator();