Merge pull request #278 from TecSet/master

Network Binding: Small Fixes
This commit is contained in:
Kai Kreuzer 2015-06-16 15:55:48 +02:00
Родитель 9cd5312316 8074ae9cb0
Коммит 7d8e9c1cc8
1 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -149,14 +149,13 @@ public class NetworkService {
int exitValue = proc.waitFor();
success = exitValue == 0;
if( exitValue != 2 && exitValue != 0 ) {
if( !success ) {
logger.debug("Ping stopped with Error Number: " + exitValue +
" on Command :" + "ping" +
(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") +
" 1 " + hostname);
return false;
}
}
@ -171,7 +170,7 @@ public class NetworkService {
logger.debug("ping program was interrupted");
}
return success ? true : false;
return success;
}