You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2020/05/21 20:43:52 UTC

[GitHub] [nifi] jfrazee commented on a change in pull request #4233: NIFI-7393: add max idle time and max idle connections parameter to InvokeHTTP

jfrazee commented on a change in pull request #4233:
URL: https://github.com/apache/nifi/pull/4233#discussion_r428903445



##########
File path: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java
##########
@@ -214,6 +215,22 @@
             .addValidator(StandardValidators.TIME_PERIOD_VALIDATOR)
             .build();
 
+    public static final PropertyDescriptor PROP_IDLE_TIMEOUT = new PropertyDescriptor.Builder()
+            .name("Idle Timeout")
+            .description("Max idle time before closing connection to the remote service.")
+            .required(true)
+            .defaultValue("5 mins")
+            .addValidator(StandardValidators.TIME_PERIOD_VALIDATOR)

Review comment:
       I think this needs to validate that it's > 0. OkHttp appears to, but it'd probably be nice if it got caught beforehand; see https://github.com/square/okhttp/blob/cfdeb570c211f83cef23c00afb18fe87c1a292f2/okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt#L49-L52
   
   You can use `StandardValidators.createTimePeriodValidator()` with a minimum of 1 sec or something.
   
   




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

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