[SIGAR-110] change to ping TCP || UDP
This commit is contained in:
parent
35a3672c31
commit
c631e8fc6a
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue