From a6d79cd9609747ea1bf76ff4d637205c88f0dd5c Mon Sep 17 00:00:00 2001 From: alexiscatnip Date: Fri, 21 Jan 2022 21:58:09 +0800 Subject: [PATCH] Fix the main thread blocking issue https://github.com/cinderblocks/libremetaverse/issues/62 --- Assets/Plugins/LibreMetaverse/DownloadManager.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/Plugins/LibreMetaverse/DownloadManager.cs b/Assets/Plugins/LibreMetaverse/DownloadManager.cs index 5c831f3..0431267 100644 --- a/Assets/Plugins/LibreMetaverse/DownloadManager.cs +++ b/Assets/Plugins/LibreMetaverse/DownloadManager.cs @@ -28,6 +28,7 @@ using System; using System.Collections.Generic; using System.Net; using System.Security.Cryptography.X509Certificates; +using System.Threading; using OpenMetaverse.Http; namespace OpenMetaverse @@ -130,7 +131,7 @@ namespace OpenMetaverse request.ClientCertificates.Add(ClientCert); // Leave idle connections to this endpoint open for up to 60 seconds - request.ServicePoint.MaxIdleTime = 0; + request.ServicePoint.MaxIdleTime = Timeout.Infinite; // Disable stupid Expect-100: Continue header request.ServicePoint.Expect100Continue = false; // Crank up the max number of connections per endpoint