Fix bug causing channels to get stuck when DB is down
This commit is contained in:
parent
ced2719f0e
commit
8b94c54d25
4 changed files with 21 additions and 2 deletions
|
|
@ -90,6 +90,10 @@ function Channel(name) {
|
|||
var self = this;
|
||||
db.channels.load(this, function (err) {
|
||||
if (err && err !== "Channel is not registered") {
|
||||
self.emit("loadFail", "Failed to load channel data from the database");
|
||||
// Force channel to be unloaded, so that it will load properly when
|
||||
// the database connection comes back
|
||||
self.emit("empty");
|
||||
return;
|
||||
} else {
|
||||
self.initModules();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue