diff --git a/SabreTools.Serialization/Wrappers/ViewStream.cs b/SabreTools.Serialization/Wrappers/ViewStream.cs index 4d961e90..fbe99363 100644 --- a/SabreTools.Serialization/Wrappers/ViewStream.cs +++ b/SabreTools.Serialization/Wrappers/ViewStream.cs @@ -40,11 +40,6 @@ namespace SabreTools.Serialization.Wrappers #region Instance Variables - /// - /// Lock object for reading from the source - /// - private readonly object _streamDataLock = new(); - /// /// Initial position within the underlying data /// @@ -60,6 +55,11 @@ namespace SabreTools.Serialization.Wrappers /// protected Stream _source; + /// + /// Lock object for reading from the source + /// + private readonly object _sourceLock = new(); + #endregion #region Constructors @@ -130,7 +130,7 @@ namespace SabreTools.Serialization.Wrappers { // Correct the read offset offset += (int)_initialPosition; - lock (_streamDataLock) + lock (_sourceLock) { return _source.Read(buffer, offset, count); }