-
Notifications
You must be signed in to change notification settings - Fork 401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: added timeouts for reading data/getting connection #1361
Conversation
LGTM |
However a bit more explanations on what a PR is about would have been nice ;-) |
Thanks for paying attention. I was desperate to get an answer. Lost in permissions etc. My apologies for brevity, I have to recall what I did 2 month ago. )) |
@@ -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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
No description provided.