chrisdutz commented on code in PR #818:
URL: https://github.com/apache/plc4x/pull/818#discussion_r1115664628
##########
plc4j/tools/connection-cache/src/main/java/org/apache/plc4x/java/utils/cache/LeasedPlcConnection.java:
##########
@@ -51,13 +51,23 @@ public void run() {
@Override
public synchronized void close() {
- // Make the connection unusable.
- connection = null;
-
+ if(connectionContainer == null) {
+ return;
+ }
Review Comment:
Yeah ... when returning a connection after a connection timed-out or got
another error, it would have thrown an error from inside the returnConnection
method of the Container.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]