CLOUDSTACK-9348: Make NioConnectio loop less aggressive

- Reverts ea2286 that introduced a wakeup on each connection loop run.
- In SSL handshake code removes delegated tasks to be run in separate threads.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2016-05-13 08:54:24 +05:30
parent 2b4b8aa40c
commit 540d9572fd
2 changed files with 4 additions and 3 deletions

View File

@ -615,7 +615,10 @@ public class Link {
case NEED_TASK:
Runnable task;
while ((task = sslEngine.getDelegatedTask()) != null) {
new Thread(task).run();
if (s_logger.isTraceEnabled()) {
s_logger.trace("SSL: Running delegated task!");
}
task.run();
}
break;
case FINISHED:

View File

@ -171,8 +171,6 @@ public abstract class NioConnection implements Callable<Boolean> {
} catch (final IOException e) {
s_logger.error("Agent will die due to this IOException!", e);
throw new NioConnectionException(e.getMessage(), e);
} finally {
_selector.wakeup();
}
}
_isStartup = false;