mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 20:16:04 +01:00
fix crash when redis server isn't running
This commit is contained in:
@@ -113,12 +113,16 @@
|
||||
};
|
||||
|
||||
module.checkCompatibility = function(callback) {
|
||||
// Redis requires v2.8.9
|
||||
module.info(module.client, function(err, info) {
|
||||
var err = semver.lt(info.redis_version, '2.8.9') ? new Error('Your Redis version is not new enough to support NodeBB, please upgrade Redis to v2.8.9 or higher.') : null;
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
if (semver.lt(info.redis_version, '2.8.9')) {
|
||||
err = new Error('Your Redis version is not new enough to support NodeBB, please upgrade Redis to v2.8.9 or higher.');
|
||||
err.stacktrace = false;
|
||||
}
|
||||
|
||||
callback(err);
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user