Files
Dapper/tests/Dapper.Tests
Cédric Luthi 9ed3525598 Do not close the inner reader when disposing wrapped data readers (#2100)
When disposing wrapped readers, only call Dispose() on the inner reader and let it catch exceptions if appropriate.

Note: this actually happened with `Microsoft.Data.SqlClient`.

```
Microsoft.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
 ---> System.ComponentModel.Win32Exception (258): The wait operation timed out.
   at void Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, bool breakConnection, Action<Action> wrapCloseInAction)
   at void Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, bool callerHasConnectionLock, bool asyncClose)
   at bool Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, out bool dataReady)
   at bool Microsoft.Data.SqlClient.SqlDataReader.TryCloseInternal(bool closeReader)
   at void Microsoft.Data.SqlClient.SqlDataReader.Close()
   at void Dapper.DbWrappedReader.Dispose(bool disposing) in /_/Dapper/WrappedReader.cs:line 149
   at ValueTask System.Data.Common.DbDataReader.DisposeAsync()
```
2024-07-03 13:32:18 +01:00
..
2023-09-12 15:58:49 +01:00
2023-09-12 15:58:49 +01:00
2020-10-11 14:56:35 -04:00
2023-09-12 15:58:49 +01:00
2023-09-12 15:58:49 +01:00
2023-09-12 15:58:49 +01:00
2020-10-11 14:56:35 -04:00
2023-09-12 15:58:49 +01:00
2020-10-11 14:56:35 -04:00
2023-09-12 15:58:49 +01:00
2023-09-12 15:58:49 +01:00
2020-11-17 09:57:17 +00:00