From f26f8159bcb7131cedb16152acd8ed6b15ceaf53 Mon Sep 17 00:00:00 2001 From: Misty Date: Sun, 21 Jun 2020 21:27:05 +0800 Subject: [PATCH] Support tencent cloud timeout handling --- BililiveRecorder.Core/RecordedRoom.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BililiveRecorder.Core/RecordedRoom.cs b/BililiveRecorder.Core/RecordedRoom.cs index 81e9897..8a31be9 100644 --- a/BililiveRecorder.Core/RecordedRoom.cs +++ b/BililiveRecorder.Core/RecordedRoom.cs @@ -310,7 +310,8 @@ namespace BililiveRecorder.Core }; _stream = await _response.Content.ReadAsStreamAsync(); - if (_response.Headers.ConnectionClose != true) + + if (!new object[] { null, true }.Contains(_response.Headers.ConnectionClose)) _stream.ReadTimeout = 3 * 1000; StreamDownloadTask = Task.Run(_ReadStreamLoop);