Commit 1995118
Fix connection leak due to race condition in counting resources
Since resources were being acquired in one async context, but being
counted in another, it was possible that under high load checks of the
total number of connections could report zero when connections were
actually created.
This commit moves the call to resourceAcquired() to the same async
context where it's being created initially or reacquired from the
existing pool.1 parent 938930f commit 1995118
1 file changed
+11
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 77 | + | |
81 | 78 | | |
82 | 79 | | |
83 | 80 | | |
| |||
190 | 187 | | |
191 | 188 | | |
192 | 189 | | |
193 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
194 | 195 | | |
195 | 196 | | |
196 | 197 | | |
| |||
215 | 216 | | |
216 | 217 | | |
217 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
218 | 224 | | |
219 | 225 | | |
220 | 226 | | |
| |||
307 | 313 | | |
308 | 314 | | |
309 | 315 | | |
310 | | - | |
311 | 316 | | |
312 | 317 | | |
313 | 318 | | |
| |||
0 commit comments