plc4x-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-plc4x] sruehl commented on a change in pull request #57: Feature/plc4 x 108 ping method
Date Fri, 29 Mar 2019 11:19:03 GMT
sruehl commented on a change in pull request #57: Feature/plc4 x 108 ping method
URL: https://github.com/apache/incubator-plc4x/pull/57#discussion_r270367844
 
 

 ##########
 File path: plc4j/protocols/driver-bases/base/src/main/java/org/apache/plc4x/java/base/connection/AbstractPlcConnection.java
 ##########
 @@ -57,6 +67,42 @@ public boolean canSubscribe() {
         return false;
     }
 
+    /**
+     * The default implementation uses the {@link #ping(int)} method.
+     * Drivers that want to implement a more specific version have to overide it.
+     */
+    @Override
+    public boolean isConnected() {
+        return ping(PING_TIMEOUT_MS);
 
 Review comment:
   with a or so we don't try to send a ping in first place if we don't have an active channel

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message