pvillard31 commented on code in PR #11804:
URL: https://github.com/apache/nifi/pull/11804#discussion_r4671507880
##########
nifi-extension-bundles/nifi-mqtt-bundle/nifi-mqtt-processors/src/main/java/org/apache/nifi/processors/mqtt/adapters/HiveMqV5ClientAdapter.java:
##########
@@ -101,14 +100,15 @@ public void connect() {
}
final Mqtt5Connect mqtt5Connect = connectBuilder.build();
- mqtt5BlockingClient.connect(mqtt5Connect);
+
+ // connection timeout is handled by client, adding extra 10 seconds
here to allow the client to complete its connection process
+ awaitWithTimeout(mqtt5AsyncClient.connect(mqtt5Connect),
clientProperties.getConnectionTimeout() + 10);
Review Comment:
Could we move the extra 10 seconds into a named constant, so the reason for
this margin is clear in the code?
--
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]