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

Function onclose

cf/src/index.js:157–162  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

155 max_lifetime: null,
156 fetch_types: false,
157 onclose() {
158 Object.entries(listen.channels).forEach(([name, { listeners }]) => {
159 delete listen.channels[name]
160 Promise.all(listeners.map(l => listen(name, l.fn, l.onlisten).catch(() => { /* noop */ })))
161 })
162 },
163 onnotify(c, x) {
164 c in listen.channels && listen.channels[c].listeners.forEach(l => l.fn(x))
165 }

Callers 1

closedFunction · 0.70

Calls 5

listenFunction · 0.70
moveFunction · 0.70
connectFunction · 0.70
forEachMethod · 0.65
catchMethod · 0.45

Tested by

no test coverage detected