fix: patch

Signed-off-by: Ricardo Arturo Cabral Mejía <me@ricardocabral.io>
This commit is contained in:
Ricardo Arturo Cabral Mejía 2023-01-27 19:23:06 -05:00
parent 280e24f75c
commit b0adba6abc
2 changed files with 16 additions and 0 deletions

View File

@ -72,6 +72,9 @@ export class WebSocketServerAdapter extends WebServerAdapter implements IWebSock
return
}
const webSocketAdapter = this.webSocketsAdapters.get(webSocket) as IWebSocketAdapter
if (!webSocketAdapter) {
return
}
webSocketAdapter.emit(WebSocketAdapterEvent.Event, event)
})
}

View File

@ -3,6 +3,19 @@ import 'pg-query-stream'
import knex, { Knex } from 'knex'
import { createLogger } from '../factories/logger-factory'
knex.Client.prototype.releaseConnection = function (connection) {
//debug('releasing connection to pool: %s', connection.__knexUid);
console.log('releasing connection to pool')
const didRelease = this.pool.release(connection)
if (!didRelease) {
console.log('pool refused connection')
//debug('pool refused connection: %s', connection.__knexUid);
}
return Promise.resolve()
}
const getMasterConfig = (): Knex.Config => ({
client: 'pg',
connection: {