Merge pull request #278 from TecSet/master
Network Binding: Small Fixes
This commit is contained in:
Коммит
7d8e9c1cc8
|
@ -149,14 +149,13 @@ public class NetworkService {
|
||||||
|
|
||||||
int exitValue = proc.waitFor();
|
int exitValue = proc.waitFor();
|
||||||
success = exitValue == 0;
|
success = exitValue == 0;
|
||||||
if( exitValue != 2 && exitValue != 0 ) {
|
if( !success ) {
|
||||||
logger.debug("Ping stopped with Error Number: " + exitValue +
|
logger.debug("Ping stopped with Error Number: " + exitValue +
|
||||||
" on Command :" + "ping" +
|
" on Command :" + "ping" +
|
||||||
(SystemUtils.IS_OS_UNIX ? " -t " : " -w ") +
|
(SystemUtils.IS_OS_UNIX ? " -t " : " -w ") +
|
||||||
String.valueOf(timeout) +
|
(SystemUtils.IS_OS_UNIX ? String.valueOf((int)(timeout / 1000)) : String.valueOf(timeout)) +
|
||||||
(SystemUtils.IS_OS_UNIX ? " -c" : " -n") +
|
(SystemUtils.IS_OS_UNIX ? " -c" : " -n") +
|
||||||
" 1 " + hostname);
|
" 1 " + hostname);
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,7 +170,7 @@ public class NetworkService {
|
||||||
logger.debug("ping program was interrupted");
|
logger.debug("ping program was interrupted");
|
||||||
}
|
}
|
||||||
|
|
||||||
return success ? true : false;
|
return success;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче