I don't know if I'm using Raining Sockets wrong, but
when I tell it stopWhenIdle(false) and there are no
open connections, NioSocket uses 100% CPU while it sits
in a loop poll()ing. I made this little modification
to poll(timeout) and in the spirit of the LGPL I'm
releasing it...
replace:
if(socketMap.isEmpty())
return;
with:
if (socketMap.isEmpty()) {
try {
Thread.sleep(1);
} catch (InterruptedException e) {
e.printStackTrace();
}
return;
}
-- Daniel Gies
dfgies@gmail.com