tab -> spaces

This commit is contained in:
Trustin Lee 2009-10-27 09:54:00 +00:00
parent e06ab750cb
commit 988089ed10
2 changed files with 14 additions and 14 deletions

View File

@ -361,12 +361,12 @@ class NioDatagramWorker implements Runnable {
}
private boolean cleanUpCancelledKeys() throws IOException {
if (cancelledKeys >= 128) { // FIXME hardcoded value
cancelledKeys = 0;
selector.selectNow();
return true;
}
return false;
if (cancelledKeys >= 128) { // FIXME hardcoded value
cancelledKeys = 0;
selector.selectNow();
return true;
}
return false;
}
private static void write(SelectionKey k) {

View File

@ -285,19 +285,19 @@ class NioWorker implements Runnable {
close(k);
}
if (cleanUpCancelledKeys()) {
if (cleanUpCancelledKeys()) {
break; // break the loop to avoid ConcurrentModificationException
}
}
}
private boolean cleanUpCancelledKeys() throws IOException {
if (cancelledKeys >= 128) { // FIXME hardcoded value
cancelledKeys = 0;
selector.selectNow();
return true;
}
return false;
if (cancelledKeys >= 128) { // FIXME hardcoded value
cancelledKeys = 0;
selector.selectNow();
return true;
}
return false;
}
private static boolean read(SelectionKey k) {