turcsanyip commented on code in PR #11804:
URL: https://github.com/apache/nifi/pull/11804#discussion_r4282869816
##########
nifi-extension-bundles/nifi-mqtt-bundle/nifi-mqtt-processors/src/main/java/org/apache/nifi/processors/mqtt/adapters/HiveMqV5ClientAdapter.java:
##########
@@ -157,7 +148,17 @@ public void
setReceivedMessageHandler(ReceivedMqttMessageHandler handler) {
});
}
- private static Mqtt5BlockingClient createClient(URI brokerUri,
MqttClientProperties clientProperties, ComponentLog logger) throws TlsException
{
+ private <T> T awaitWithTimeout(Future<T> future) {
+ try {
+ final T response =
future.get(clientProperties.getConnectionTimeout(), TimeUnit.SECONDS);
Review Comment:
Modified the implementation to clean up the failed client.
--
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]