[SIGAR-110] change to ping TCP || UDP
This commit is contained in:
1 parent
35a3672c31
commit
c631e8fc6a
1 file changed
+4
-1
@@ -50,7 +50,10 @@ public class NfsFileSystem extends FileSystem implements java.io.Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean ping() {
|
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() {
|
public String getUnreachableMessage() {
|
||||||
|
|||||||
Reference in new issue
Block a user