mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-20 15:30:39 +01:00
fix: #8474
make isPrimary and isCluster always booleans they were strings when using ./nodebb start and boolean if they were in config.json and started with node app.js
This commit is contained in:
@@ -27,12 +27,14 @@ Sockets.init = function (server) {
|
||||
path: nconf.get('relative_path') + '/socket.io',
|
||||
});
|
||||
|
||||
if (nconf.get('singleHostCluster')) {
|
||||
io.adapter(require('./single-host-cluster'));
|
||||
} else if (nconf.get('redis')) {
|
||||
io.adapter(require('../database/redis').socketAdapter());
|
||||
} else {
|
||||
io.adapter(db.socketAdapter());
|
||||
if (nconf.get('isCluster')) {
|
||||
if (nconf.get('singleHostCluster')) {
|
||||
io.adapter(require('./single-host-cluster'));
|
||||
} else if (nconf.get('redis')) {
|
||||
io.adapter(require('../database/redis').socketAdapter());
|
||||
} else {
|
||||
io.adapter(db.socketAdapter());
|
||||
}
|
||||
}
|
||||
|
||||
io.use(socketioWildcard);
|
||||
|
||||
Reference in New Issue
Block a user