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

Function closeServer

src/node/utils/oauthUtils.ts:26–30  ·  view source on GitHub ↗
(server: http.Server)

Source from the content-addressed store, hash-verified

24
25/** Gracefully close an HTTP server, resolving when all connections are drained. */
26export function closeServer(server: http.Server): Promise<void> {
27 return new Promise((resolve) => {
28 server.close(() => resolve());
29 });
30}
31
32/** Escape HTML special characters to prevent XSS in rendered callback pages. */
33export function escapeHtml(input: string): string {

Callers 6

oauthUtils.test.tsFile · 0.90
startLoopbackServerFunction · 0.90
registerMethod · 0.90
finishMethod · 0.90
startDesktopFlowMethod · 0.90
finishDesktopFlowMethod · 0.90

Calls 2

closeMethod · 0.65
resolveFunction · 0.50

Tested by

no test coverage detected