loopbackProxyServer.ts ×9

Frontier kind: Code frontier

unlabeled · c_367a1bcd534a

83 tests · 8111 LOC · 38 files · introduces 0 tests · 28 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
9 ranges28 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1282 ranges8111 lines · 38 files · Browse complete extent
All tests (intent)
83 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 28 introduced LOC across 9 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/shared/loopbackProxyServer.ts 28 introduced LOC · 9 ranges

Open complete file

176 }
177 const runtime = await this._ensureRuntime(seed);
178 > // Re-check after the await: dispose() may have run while loopbackProxyServer.ts
179 > // _ensureRuntime was awaiting the bind, in which case the runtime
180 > // we received is already torn down — but a fresh start() in between
181 > // is also possible, so verify the active runtime hasn't moved.
182 if (this._disposed || this._runtime !== runtime) {
183 throw new Error(`${this.name} has been disposed`);
184 }
185 > runtime.refcount++; loopbackProxyServer.ts
186 >
187 > let released = false;
188 > const release = () => {
189 > if (released) {
190 return;
191 }
192 > released = true; loopbackProxyServer.ts
193 > this._releaseHandle(runtime);
194 > };
195 > return { runtime, release };
196 }
197
230 throw new Error(`${this.name} has been disposed`);
231 }
232 > this._runtime = rt; loopbackProxyServer.ts
233 > return rt;
234 } finally {
235 this._starting = undefined;
241
242 private _releaseHandle(runtime: IInternalRuntime<TState>): void {
243 > // If `dispose()` (or a later bind) already replaced the runtime, the loopbackProxyServer.ts
244 > // handle's refcount no longer applies.
245 > if (this._runtime !== runtime) {
246 return;
247 }
250 this._teardownRuntime();
251 }
253
254 private _teardownRuntime(): void {
257 return;
258 }
259 > this._runtime = undefined; loopbackProxyServer.ts
260 > // Abort in-flight requests so their catch handlers run and destroy
261 > // still-open responses; closeAllConnections() then frees the
262 > // listening socket immediately.
263 > for (const entry of runtime.inFlight) {
264 entry.ac.abort();
265 }
266 > runtime.server.closeAllConnections(); loopbackProxyServer.ts
267 > runtime.server.close(err => {
268 > if (err) {
269 this._logService.warn(`[${this.name}] server.close error: ${err.message}`);
270 }
272 }
273