CLOUDSTACK-9348: Make NioConnection selector blocking by timeout

Uses timeout based selector blocking. This makes connection handling
aggressive safely.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2016-05-19 16:17:28 +05:30
parent c8e0fc74ae
commit 033f87deda
1 changed files with 1 additions and 1 deletions

View File

@ -130,7 +130,7 @@ public abstract class NioConnection implements Runnable {
while (_isRunning) {
try {
_selector.select();
_selector.select(1000);
// Someone is ready for I/O, get the ready keys
Set<SelectionKey> readyKeys = _selector.selectedKeys();