pnowojski commented on a change in pull request #10184: [FLINK-14481]Modify the 
Flink valid socket port check to 0 to 65535.
URL: https://github.com/apache/flink/pull/10184#discussion_r346201847
 
 

 ##########
 File path: 
flink-metrics/flink-metrics-influxdb/src/main/java/org/apache/flink/metrics/influxdb/InfluxdbReporter.java
 ##########
 @@ -148,6 +148,6 @@ private static boolean isValidHost(String host) {
        }
 
        private static boolean isValidPort(int port) {
-               return 0 < port && port <= 65535;
+               return 0 <= port && port <= 65535;
 
 Review comment:
   I think `0` is not a valid port in this case. This is being used to connect 
somewhere, where `0` makes sense only when setting up a server/listening socket.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to