MCPcopy Index your code
hub / github.com/buildbot/buildbot / unsubscribe

Method unsubscribe

www/data-module/src/data/WebSocketClient.ts:115–128  ·  view source on GitHub ↗
(eventPath: string, collection: any)

Source from the content-addressed store, hash-verified

113 }
114
115 unsubscribe(eventPath: string, collection: any) {
116 const subscribersForPath = this.getSubscribersList(eventPath);
117 const pos = subscribersForPath.indexOf(collection);
118 if (pos >= 0) {
119 subscribersForPath.splice(pos, 1);
120 if (subscribersForPath.length === 0) {
121 return this.send({
122 cmd: "stopConsuming",
123 path: eventPath
124 });
125 }
126 }
127 return Promise.resolve();
128 }
129
130 private getSubscribersList(eventPath: string) {
131 if (!(eventPath in this.subscribers)) {

Callers 2

closeMethod · 0.45
closeMethod · 0.45

Calls 3

getSubscribersListMethod · 0.95
sendMethod · 0.95
resolveMethod · 0.45

Tested by

no test coverage detected