mirror of
https://github.com/urbit/shrub.git
synced 2024-12-29 15:14:17 +03:00
landscape: channel.js, address requested changes
This commit is contained in:
parent
a07757c313
commit
0cd4d12400
@ -207,14 +207,12 @@ class Channel {
|
||||
} else if (obj.response == "subscribe" ||
|
||||
(obj.response == "poke" && !!subFuncs)) {
|
||||
let funcs = subFuncs;
|
||||
// on a response to a subscribe, we only notify the caller on err
|
||||
//
|
||||
|
||||
if (obj.hasOwnProperty("err")) {
|
||||
funcs["err"](obj.err);
|
||||
this.outstandingSubscriptions.delete(obj.id);
|
||||
} else if (obj.hasOwnProperty("ok")) {
|
||||
funcs["subAck"](obj);
|
||||
this.outstandingSubscriptions.delete(obj.id);
|
||||
}
|
||||
} else if (obj.response == "diff") {
|
||||
let funcs = subFuncs;
|
||||
|
Loading…
Reference in New Issue
Block a user