MCPcopy Create free account
hub / github.com/porsager/postgres / end

Function end

cf/src/connection.js:415–422  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

413 }
414
415 function end() {
416 return ending || (
417 !connection.reserved && onend(connection),
418 !connection.reserved && !initial && !query && sent.length === 0
419 ? (terminate(), new Promise(r => socket && socket.readyState !== 'closed' ? socket.once('close', r) : r()))
420 : ending = new Promise(r => ended = r)
421 )
422 }
423
424 function terminate() {
425 terminated = true

Callers

nothing calls this directly

Calls 2

onendFunction · 0.70
terminateFunction · 0.70

Tested by

no test coverage detected