Skip to content
Snippets Groups Projects
Commit bb08fcfe authored by MaZiFAU's avatar MaZiFAU
Browse files

Bugfix: EternalLoop if Server not found

parent f012cc78
No related branches found
No related tags found
No related merge requests found
......@@ -480,7 +480,8 @@ static string _SendAdd(string path, string body)//, Action<string> uriCallback)
UnityWebRequestAsyncOperation web =
www.SendWebRequest();
while (!web.isDone) ;
while (!web.isDone // not enough as querry
&& www.result == UnityWebRequest.Result.InProgress) ;
if (www.result == UnityWebRequest.Result.ConnectionError
|| www.result == UnityWebRequest.Result.ProtocolError)
......@@ -489,20 +490,18 @@ static string _SendAdd(string path, string body)//, Action<string> uriCallback)
//uriCallback(null);
return null; // yield break;
}
else
{
while (!www.downloadHandler.isDone)
//yield return null
;
FactReference res = JsonUtility.FromJson<FactReference>(www.downloadHandler.text);
while (!www.downloadHandler.isDone)
//yield return null
;
if (CommunicationEvents.VerboseURI)
Debug.Log("Server added Fact:\n" + res.uri);
FactReference res = JsonUtility.FromJson<FactReference>(www.downloadHandler.text);
//uriCallback(res.uri);
return res.uri; // yield break;
}
if (CommunicationEvents.VerboseURI)
Debug.Log("Server added Fact:\n" + res.uri);
//uriCallback(res.uri);
return res.uri; // yield break;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment