File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
packages/core/src/internal Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -178,11 +178,7 @@ class ConnectionHolder implements ConnectionHolderInterface {
178
178
return this . _connectionPromise
179
179
}
180
180
181
- < << << << HEAD
182
- close ( ) : Promise < null | Connection > {
183
- = === ===
184
- close ( hasTx ?: boolean ) : Promise < void | Connection > {
185
- >>> > >>> Sending reset if there is a tx going on
181
+ close ( hasTx ?: boolean ) : Promise < null | Connection > {
186
182
if ( this . _referenceCount === 0 ) {
187
183
return this . _connectionPromise
188
184
}
@@ -197,11 +193,11 @@ class ConnectionHolder implements ConnectionHolderInterface {
197
193
* @return {Promise } - promise resolved then connection is returned to the pool.
198
194
* @private
199
195
*/
200
- private _releaseConnection ( ) : Promise < Connection | null > {
196
+ private _releaseConnection ( hasTx ?: boolean ) : Promise < Connection | null > {
201
197
this . _connectionPromise = this . _connectionPromise
202
198
. then ( ( connection ?: Connection | null ) => {
203
199
if ( connection != null ) {
204
- if ( connection . isOpen ( ) && ( connection . hasOngoingObservableRequests ( ) || hasTx ) ) {
200
+ if ( connection . isOpen ( ) && ( connection . hasOngoingObservableRequests ( ) || hasTx === true ) ) {
205
201
return connection
206
202
. resetAndFlush ( )
207
203
. catch ( ignoreError )
You can’t perform that action at this time.
0 commit comments