MCPcopy
hub / github.com/brianc/node-postgres / _remove

Method _remove

packages/pg-pool/index.js:172–188  ·  view source on GitHub ↗
(client, callback)

Source from the content-addressed store, hash-verified

170 }
171
172 _remove(client, callback) {
173 const removed = removeWhere(this._idle, (item) => item.client === client)
174
175 if (removed !== undefined) {
176 clearTimeout(removed.timeoutId)
177 }
178
179 this._clients = this._clients.filter((c) => c !== client)
180 const context = this
181 client.end(() => {
182 context.emit('remove', client)
183
184 if (typeof callback === 'function') {
185 callback()
186 }
187 })
188 }
189
190 connect(cb) {
191 if (this.ending) {

Callers 3

_pulseQueueMethod · 0.95
_releaseMethod · 0.95
makeIdleListenerFunction · 0.80

Calls 3

removeWhereFunction · 0.85
callbackFunction · 0.85
endMethod · 0.45

Tested by

no test coverage detected