Merge remote-tracking branch 'origin/adam/async-creation' into adam/async-creation

This commit is contained in:
Adam Hathcock 2026-01-23 09:46:53 +00:00
commit fbc168fafe
2 changed files with 10 additions and 3 deletions

View file

@ -154,7 +154,7 @@ public partial class SharpCompressStream
#if DEBUG_STREAMS
this.DebugDispose(typeof(SharpCompressStream));
#endif
if (_isDisposed || LeaveOpen)
if (_isDisposed)
{
return;
}
@ -166,7 +166,10 @@ public partial class SharpCompressStream
}
_isDisposed = true;
await base.DisposeAsync();
if (this.LeaveOpen)
{
return;
}
await Stream.DisposeAsync();
if (_buffer != null)
{

View file

@ -141,7 +141,7 @@ public partial class SharpCompressStream : Stream, IStreamStack
#if DEBUG_STREAMS
this.DebugDispose(typeof(SharpCompressStream));
#endif
if (_isDisposed || this.LeaveOpen)
if (_isDisposed)
{
return;
}
@ -154,6 +154,10 @@ public partial class SharpCompressStream : Stream, IStreamStack
}
_isDisposed = true;
base.Dispose(disposing);
if (this.LeaveOpen)
{
return;
}
if (disposing)
{
Stream.Dispose();