mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
CLOUDSTACK-9348: Reduce Nio selector wait time
This reduced the Nio loop selector wait time, this way the selector will check frequently (as much as 100ms per iteration) and handle any pending connection/tasks. This would make reconnections very quick at the expense of some CPU usage. Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
e4ba640a28
commit
0381b7ea18
@ -125,7 +125,7 @@ public abstract class NioConnection implements Callable<Boolean> {
|
||||
public Boolean call() throws NioConnectionException {
|
||||
while (_isRunning) {
|
||||
try {
|
||||
_selector.select(1000);
|
||||
_selector.select(100);
|
||||
|
||||
// Someone is ready for I/O, get the ready keys
|
||||
final Set<SelectionKey> readyKeys = _selector.selectedKeys();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user