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

Function end

cjs/src/connection.js:413–420  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

onendFunction · 0.70
terminateFunction · 0.70

Tested by

no test coverage detected