trap another error which was causing sporadic failures
parent
c13bfe978a
commit
8c614f6b25
|
@ -142,9 +142,14 @@ console.log("[" + userPass + "] registered");
|
||||||
var sendMsgs = function () {
|
var sendMsgs = function () {
|
||||||
sendChannelMessage(ctx, chan, msg, function () {
|
sendChannelMessage(ctx, chan, msg, function () {
|
||||||
chan.push(client);
|
chan.push(client);
|
||||||
ctx.store.getMessages(chan.name, function (msg) {
|
try {
|
||||||
sendMsg(msg, socket);
|
ctx.store.getMessages(chan.name, function (msg) {
|
||||||
});
|
sendMsg(msg, socket);
|
||||||
|
});
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e.stack);
|
||||||
|
try { socket.close(); } catch (e) { }
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
if (newChan) {
|
if (newChan) {
|
||||||
|
|
Loading…
Reference in New Issue