Fixing DL4J UI system property for getting port value (#9162)
Signed-off-by: shamsulazeem <shamsazeem20@gmail.com>master
parent
124d0a1965
commit
7f571b3c52
|
@ -369,7 +369,7 @@ public class VertxUIServer extends AbstractVerticle implements UIServer {
|
||||||
|
|
||||||
//Check port property
|
//Check port property
|
||||||
int port = instancePort == null ? DEFAULT_UI_PORT : instancePort;
|
int port = instancePort == null ? DEFAULT_UI_PORT : instancePort;
|
||||||
String portProp = System.getenv(DL4JSystemProperties.UI_SERVER_PORT_PROPERTY);
|
String portProp = System.getProperty(DL4JSystemProperties.UI_SERVER_PORT_PROPERTY);
|
||||||
if(portProp != null && !portProp.isEmpty()){
|
if(portProp != null && !portProp.isEmpty()){
|
||||||
try{
|
try{
|
||||||
port = Integer.parseInt(portProp);
|
port = Integer.parseInt(portProp);
|
||||||
|
@ -378,6 +378,10 @@ public class VertxUIServer extends AbstractVerticle implements UIServer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (port < 0 || port > 0xFFFF) {
|
||||||
|
throw new IllegalStateException("Valid port range is 0 <= port <= 65535. The given port was " + port);
|
||||||
|
}
|
||||||
|
|
||||||
uiEventRoutingThread = new Thread(new StatsEventRouterRunnable());
|
uiEventRoutingThread = new Thread(new StatsEventRouterRunnable());
|
||||||
uiEventRoutingThread.setDaemon(true);
|
uiEventRoutingThread.setDaemon(true);
|
||||||
uiEventRoutingThread.start();
|
uiEventRoutingThread.start();
|
||||||
|
|
Loading…
Reference in New Issue