File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/MySqlConnector/MySql.Data.MySqlClient Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -21,19 +21,19 @@ public sealed class MySqlDataReader : DbDataReader
21
21
{
22
22
public override bool NextResult ( )
23
23
{
24
- Command . ResetCommandTimeout ( ) ;
24
+ Command ? . ResetCommandTimeout ( ) ;
25
25
return NextResultAsync ( IOBehavior . Synchronous , CancellationToken . None ) . GetAwaiter ( ) . GetResult ( ) ;
26
26
}
27
27
28
28
public override bool Read ( )
29
29
{
30
- Command . ResetCommandTimeout ( ) ;
30
+ Command ? . ResetCommandTimeout ( ) ;
31
31
return GetResultSet ( ) . Read ( ) ;
32
32
}
33
33
34
34
public override Task < bool > ReadAsync ( CancellationToken cancellationToken )
35
35
{
36
- Command . ResetCommandTimeout ( ) ;
36
+ Command ? . ResetCommandTimeout ( ) ;
37
37
return GetResultSet ( ) . ReadAsync ( cancellationToken ) ;
38
38
}
39
39
@@ -433,7 +433,7 @@ private void DoClose()
433
433
private void VerifyNotDisposed ( )
434
434
{
435
435
if ( Command == null )
436
- throw new ObjectDisposedException ( GetType ( ) . Name ) ;
436
+ throw new InvalidOperationException ( "Can't call this method when MySqlDataReader is closed." ) ;
437
437
}
438
438
439
439
private ResultSet GetResultSet ( )
You can’t perform that action at this time.
0 commit comments