Commit a7322be
Nick Craver
Partial fix for #399 - track .Close() where possible
Okay so...we can't fix this completely. It has to be a best effort. The problem here is: not everything is going to call .Close(). The main usage case here is a DbDataReader passed a CommandBehavior.CloseConnection. It will call .Close() *on its expected type*, e.g. a SqlConnection. This will not be triggering the .Close() wrapper introduced here.
Everywhere else we do call .Close() explicitly will work fine, but even things like Dapper's .Query() won't show a .Close() in the profiler customer timings if using a data reader with close-on-finish behavior behind the scenes.1 parent a71fc6b commit a7322be
2 files changed
+41
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
93 | 106 | | |
94 | 107 | | |
95 | 108 | | |
| |||
137 | 150 | | |
138 | 151 | | |
139 | 152 | | |
140 | | - | |
| 153 | + | |
141 | 154 | | |
142 | 155 | | |
143 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
268 | | - | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
269 | 286 | | |
270 | 287 | | |
271 | 288 | | |
| |||
279 | 296 | | |
280 | 297 | | |
281 | 298 | | |
282 | | - | |
| 299 | + | |
283 | 300 | | |
284 | 301 | | |
285 | 302 | | |
| |||
292 | 309 | | |
293 | 310 | | |
294 | 311 | | |
295 | | - | |
| 312 | + | |
296 | 313 | | |
297 | 314 | | |
298 | 315 | | |
| |||
314 | 331 | | |
315 | 332 | | |
316 | 333 | | |
317 | | - | |
| 334 | + | |
318 | 335 | | |
319 | 336 | | |
320 | 337 | | |
| |||
323 | 340 | | |
324 | 341 | | |
325 | 342 | | |
326 | | - | |
| 343 | + | |
327 | 344 | | |
328 | 345 | | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
329 | 350 | | |
330 | 351 | | |
331 | 352 | | |
| |||
0 commit comments