[SIGAR-110] change to ping TCP || UDP

This commit is contained in:
Doug MacEachern 2008-05-30 04:09:17 +00:00
parent 35a3672c31
commit c631e8fc6a
1 changed files with 4 additions and 1 deletions

View File

@ -50,7 +50,10 @@ public class NfsFileSystem extends FileSystem implements java.io.Serializable {
}
public boolean ping() {
return RPC.ping(getHostname(), NFS_PROGRAM) == 0;
String hostname = getHostname();
return
(RPC.ping(hostname, RPC.TCP, NFS_PROGRAM, 2) == 0) ||
(RPC.ping(hostname, RPC.UDP, NFS_PROGRAM, 2) == 0);
}
public String getUnreachableMessage() {