MCPcopy
hub / github.com/coder/mux / cancel

Method cancel

vscode/src/webview/createVscodeOrpcLink.ts:189–201  ·  view source on GitHub ↗
(reason: string)

Source from the content-addressed store, hash-verified

187 }
188
189 cancel(reason: string): void {
190 if (this.done) {
191 return;
192 }
193
194 try {
195 this.bridge.postMessage({ type: "orpcStreamCancel", streamId: this.streamId });
196 } catch {
197 // Best-effort: the webview might be disposed.
198 }
199
200 this.fail(new Error(`Stream cancelled: ${reason}`));
201 }
202
203 async next(): Promise<IteratorResult<T>> {
204 if (this.error) {

Callers 4

constructorMethod · 0.95
listenerMethod · 0.95
pushMethod · 0.95
returnMethod · 0.95

Calls 2

failMethod · 0.95
postMessageMethod · 0.45

Tested by

no test coverage detected