MCPcopy Create free account
hub / github.com/nodejs/undici / closeServer

Function closeServer

test/stream-compat.js:11–16  ·  view source on GitHub ↗
(server)

Source from the content-addressed store, hash-verified

9const EE = require('node:events')
10
11function closeServer (server) {
12 return new Promise(resolve => {
13 server.closeAllConnections?.()
14 server.close(resolve)
15 })
16}
17
18test('stream body without destroy', async (t) => {
19 const ctx = t

Callers 2

stream-compat.jsFile · 0.85

Calls 1

closeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…