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

Function end

deno/src/connection.js:416–423  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

onendFunction · 0.70
terminateFunction · 0.70

Tested by

no test coverage detected