Browse Source

webRequest.timeout=5

蓝色星空 1 year ago
parent
commit
190a1632d6
1 changed files with 1 additions and 0 deletions
  1. 1 0
      Assets/Scripts/Net/HttpTool.cs

+ 1 - 0
Assets/Scripts/Net/HttpTool.cs

@@ -102,6 +102,7 @@ public class HttpTool : MonoSingleton<HttpTool>
                 webRequest.SetRequestHeader(v.Key, v.Value);
                 Debug.Log(v.Value + "   " + methodName);
             }
+            webRequest.timeout = 5;
             yield return webRequest.SendWebRequest();
 
             if (webRequest.isHttpError || webRequest.isNetworkError)