File tree 2 files changed +3
-1
lines changed
2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -309,6 +309,7 @@ class Pool {
309
309
}
310
310
poolState . close ( )
311
311
delete this . _pools [ key ]
312
+ delete this . _activeResourceCounts [ key ]
312
313
delete this . _poolState [ key ]
313
314
}
314
315
Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ describe('#unit Pool', () => {
198
198
199
199
await pool . purge ( address1 )
200
200
201
- expect ( pool . activeResourceCount ( address1 ) ) . toEqual ( 1 )
201
+ expect ( pool . activeResourceCount ( address1 ) ) . toEqual ( 0 )
202
202
203
203
await r01 . close ( )
204
204
@@ -257,6 +257,7 @@ describe('#unit Pool', () => {
257
257
// Purging the key
258
258
await pool . purge ( address )
259
259
expect ( pool . has ( address ) ) . toBeFalsy ( )
260
+ expect ( pool . activeResourceCount ( address ) ) . toBe ( 0 )
260
261
expect ( r0 . destroyed ) . toBeFalsy ( )
261
262
262
263
// Acquiring second resolve should recreate the pool
You can’t perform that action at this time.
0 commit comments