去掉ping和單點登錄前端

This commit is contained in:
Caiyanpeng committed 2021-11-12 16:54:55 +08:00
1 parent d754ff3b15
commit 492040d382
5 files changed
+48 -44

No files matched your search

+2 -3
View File
@@ -29,13 +29,12 @@ namespace Assets.Scripts.Apis
}
//protected static EasyHttp.Http.HttpClient http;
private static System.Net.Http.HttpClient httpClient;
private static PfHttpClientHandler httpClientHandler;
private static HttpClientHandler httpClientHandler;
static ApiBase()
{
//http = new EasyHttp.Http.HttpClient();
//http.Request.PersistCookies = true;
httpClientHandler = new PfHttpClientHandler();
httpClientHandler = new HttpClientHandler();
httpClientHandler.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
httpClientHandler.Proxy = WebRequest.GetSystemWebProxy();
httpClientHandler.CookieContainer = _cookieCollection;
+15 -15
View File
@@ -17,8 +17,8 @@ namespace Assets.Scripts.Scenes
{
Debug.Log("base scene awake");
Application.logMessageReceived += Application_logMessageReceived;
StopCoroutine("Ping");
StartCoroutine(Ping());
//StopCoroutine("Ping");
//StartCoroutine(Ping());
}
private IEnumerator Ping()
@@ -64,19 +64,19 @@ namespace Assets.Scripts.Scenes
}
protected virtual void Update()
{
if (Application.internetReachability == NetworkReachability.NotReachable)
{
isNetWorkLose = true;
App.delayTime = -1;
}
else if (null != ping && ping.isDone)
{
isNetWorkLose = false;
App.delayTime = ping.time;
Debug.Log(App.delayTime);
ping.DestroyPing();
ping = null;
}
//if (Application.internetReachability == NetworkReachability.NotReachable)
//{
// isNetWorkLose = true;
// App.delayTime = -1;
//}
//else if (null != ping && ping.isDone)
//{
// isNetWorkLose = false;
// App.delayTime = ping.time;
// Debug.Log(App.delayTime);
// ping.DestroyPing();
// ping = null;
//}
}
}
}