chrisdutz commented on code in PR #1361:
URL: https://github.com/apache/plc4x/pull/1361#discussion_r1512799098


##########
plc4j/tools/connection-cache/src/main/java/org/apache/plc4x/java/utils/cache/LeasedPlcConnection.java:
##########
@@ -120,14 +126,18 @@ public PlcReadRequest build() {
                 return new PlcReadRequest(){
                     @Override
                     public CompletableFuture<? extends PlcReadResponse> 
execute() {
-                        CompletableFuture<? extends PlcReadResponse> future = 
innerPlcReadRequest.execute();
+                        CompletableFuture<? extends PlcReadResponse> future =
+                            
innerPlcReadRequest.execute().orTimeout(Math.min(1000,maxUseDuration.toMillis()),
 TimeUnit.MILLISECONDS);

Review Comment:
   So as far as I remember the ConnectionPool ... that used to have a timer to 
invalidate a connection if being used too long ... but I guess in that case 
possibly the read operation never timed out, right? So this is an additional 
abort on the side of the user, correct?



-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to