From da7af895fbdacd639b58bc8102b1ba99162ee26e Mon Sep 17 00:00:00 2001 From: Michael Bucari-Tovo Date: Sat, 3 Jul 2021 14:37:24 -0600 Subject: [PATCH] Fixed possible hang issue. --- AaxDecrypter/NetworkFileStream.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AaxDecrypter/NetworkFileStream.cs b/AaxDecrypter/NetworkFileStream.cs index 009b9228..cae20ac6 100644 --- a/AaxDecrypter/NetworkFileStream.cs +++ b/AaxDecrypter/NetworkFileStream.cs @@ -367,7 +367,7 @@ namespace AaxDecrypter //read operation will block until file contains enough data //to fulfil the request. - while (requiredPosition > WritePosition) + while (requiredPosition > WritePosition && !isCancelled) Thread.Sleep(0); return _readFile.Read(buffer, offset, count);