Skip to content

Commit

Permalink
Fix TCP port range (#773)
Browse files Browse the repository at this point in the history
Change-Id: Ifac428efc2a1fd7495e7caded3a9710b806d7696
  • Loading branch information
frankfliu authored Mar 22, 2021
1 parent d8bdf60 commit e44698d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion serving/src/main/java/ai/djl/serving/util/Connector.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public static Connector parse(String binding, ConnectorType connectorType) {
} else {
port = Integer.parseInt(listeningPort);
}
if (port >= Short.MAX_VALUE) {
if (port >= 65535) {
throw new IllegalArgumentException("Invalid port number: " + binding);
}
return new Connector(port, false, host, String.valueOf(port), ssl, connectorType);
Expand Down

0 comments on commit e44698d

Please sign in to comment.