mirror of https://github.com/apache/cloudstack.git
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:
parent
2b4b8aa40c
commit
540d9572fd
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue