mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-07 16:45:10 +00:00
修正CancellationTokenSource重复Dispose问题
修正CancellationTokenSource重复Dispose问题
This commit is contained in:
@@ -92,7 +92,6 @@ namespace TEngine
|
|||||||
{
|
{
|
||||||
Log.Warning($"HttpPost {unityWebRequest.url} be canceled!");
|
Log.Warning($"HttpPost {unityWebRequest.url} be canceled!");
|
||||||
unityWebRequest.Dispose();
|
unityWebRequest.Dispose();
|
||||||
cts.Dispose();
|
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -102,14 +101,12 @@ namespace TEngine
|
|||||||
{
|
{
|
||||||
Log.Warning("HttpPost Timeout");
|
Log.Warning("HttpPost Timeout");
|
||||||
unityWebRequest.Dispose();
|
unityWebRequest.Dispose();
|
||||||
cts.Dispose();
|
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
string ret = unityWebRequest.downloadHandler.text;
|
string ret = unityWebRequest.downloadHandler.text;
|
||||||
unityWebRequest.Dispose();
|
unityWebRequest.Dispose();
|
||||||
cts.Dispose();
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user