mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-09 04:23:45 -05:00
Merge pull request #1770 from monsanto/default-ipv4
Use 0.0.0.0 if Config.bindaddress is missing.
This commit is contained in:
commit
41706e2cb0
10
sockets.js
10
sockets.js
|
|
@ -427,17 +427,17 @@ if (cluster.isMaster) {
|
|||
});
|
||||
});
|
||||
server.installHandlers(app, {});
|
||||
if (Config.bindaddress === '0.0.0.0') Config.bindaddress = undefined;
|
||||
app.listen(Config.port, Config.bindaddress || undefined);
|
||||
console.log('Worker ' + cluster.worker.id + ' now listening on ' + (Config.bindaddress || '*') + ':' + Config.port);
|
||||
if (!Config.bindaddress) Config.bindaddress = '0.0.0.0';
|
||||
app.listen(Config.port, Config.bindaddress);
|
||||
console.log('Worker ' + cluster.worker.id + ' now listening on ' + Config.bindaddress + ':' + Config.port);
|
||||
|
||||
if (appssl) {
|
||||
server.installHandlers(appssl, {});
|
||||
appssl.listen(Config.ssl.port);
|
||||
appssl.listen(Config.ssl.port, Config.bindaddress);
|
||||
console.log('Worker ' + cluster.worker.id + ' now listening for SSL on port ' + Config.ssl.port);
|
||||
}
|
||||
|
||||
console.log('Test your server at http://' + (Config.bindaddress || 'localhost') + ':' + Config.port);
|
||||
console.log('Test your server at http://' + (Config.bindaddress === '0.0.0.0' ? 'localhost' : Config.bindaddress) + ':' + Config.port);
|
||||
|
||||
require('./repl.js').start('sockets-', cluster.worker.id + '-' + process.pid, function (cmd) { return eval(cmd); });
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user