Dismiss messages from a mailbox when closing it

pull/1/head
yflory 4 years ago
parent 9210bbd4fc
commit 16a95eb3fd

@ -206,6 +206,10 @@ proxy.mailboxes = {
if (!box) { return void cb(); } if (!box) { return void cb(); }
if (!box.cpNf || typeof(box.cpNf.stop) !== "function") { return void cb('EINVAL'); } if (!box.cpNf || typeof(box.cpNf.stop) !== "function") { return void cb('EINVAL'); }
box.cpNf.stop(); box.cpNf.stop();
Object.keys(box.content).forEach(function (h) {
Handlers.remove(ctx, box, box.content[h], h);
hideMessage(ctx, type, h, ctx.clients);
});
delete ctx.boxes[type]; delete ctx.boxes[type];
}; };
var openChannel = function (ctx, type, m, onReady, opts) { var openChannel = function (ctx, type, m, onReady, opts) {

Loading…
Cancel
Save