Please sign in to comment.
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.
- Loading branch information...
Showing with 41 additions and 7 deletions.