Listen 'address' for WebSockets
This commit is contained in:
parent
37ea1e3a30
commit
50426d0e60
|
@ -200,7 +200,8 @@ exports.getModule = class WebSocketLoginServer extends LoginServerModule {
|
||||||
}
|
}
|
||||||
|
|
||||||
const serverName = `${ModuleInfo.name} (${serverType})`;
|
const serverName = `${ModuleInfo.name} (${serverType})`;
|
||||||
const confPort = _.get(Config(), [ 'loginServers', 'webSocket', 'secure' === serverType ? 'wss' : 'ws', 'port' ] );
|
const conf = _.get(Config(), [ 'loginServers', 'webSocket', 'secure' === serverType ? 'wss' : 'ws' ] );
|
||||||
|
const confPort = conf.port;
|
||||||
const port = parseInt(confPort);
|
const port = parseInt(confPort);
|
||||||
|
|
||||||
if(isNaN(port)) {
|
if(isNaN(port)) {
|
||||||
|
@ -208,7 +209,7 @@ exports.getModule = class WebSocketLoginServer extends LoginServerModule {
|
||||||
return nextServerType(Errors.Invalid(`Invalid port: ${confPort}`));
|
return nextServerType(Errors.Invalid(`Invalid port: ${confPort}`));
|
||||||
}
|
}
|
||||||
|
|
||||||
server.httpServer.listen(port, err => {
|
server.httpServer.listen(port, conf.address, err => {
|
||||||
if(err) {
|
if(err) {
|
||||||
return nextServerType(err);
|
return nextServerType(err);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue