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

Method stopServer

src/node/services/serverService.ts:468–484  ·  view source on GitHub ↗

* Stop the HTTP/WS API server and release the lockfile.

()

Source from the content-addressed store, hash-verified

466 * Stop the HTTP/WS API server and release the lockfile.
467 */
468 async stopServer(): Promise<void> {
469 try {
470 await this.mdnsAdvertiser.stop();
471 } catch (err) {
472 log.warn("Failed to stop mDNS advertiser:", err);
473 }
474
475 if (this.lockfile) {
476 await this.lockfile.release();
477 this.lockfile = null;
478 }
479 if (this.server) {
480 await this.server.close();
481 this.server = null;
482 }
483 this.serverInfo = null;
484 }
485
486 /** Return Tailscale-backed local addresses users can bind the remote-access server to. */
487 getTailscaleBindHosts(): TailscaleBindHost[] {

Callers 4

main.tsFile · 0.80
cleanupFunction · 0.80
routerFunction · 0.80

Calls 3

closeMethod · 0.65
stopMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected