mirror of
https://github.com/Cameri/nostream.git
synced 2025-03-17 21:31:48 +01:00
fix: patch
Signed-off-by: Ricardo Arturo Cabral Mejía <me@ricardocabral.io>
This commit is contained in:
parent
280e24f75c
commit
b0adba6abc
@ -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)
|
||||
})
|
||||
}
|
||||
|
@ -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: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user