- Home /
UnityWebRequest timing out ? Send() finishes but isDone = false
i'm building a long-poll system using the UnityWebRequest system in Unity 5.3.3.
in a long-poll system, the normal operation is the client makes a request to the server and the server holds on to the request indefinitely until it actually has something to say, and then it returns the response.
so the client might issue the request and not get a response for several seconds or even minutes.
but when running from the unity IDE, the "Send()" completes after just a few milliseconds. the responseStatus is -1 and the isDone flag is false.
so i'm doing this, and it works, but it's not clean.
yield return uwr.Send();
while (!uwr.isDone) {
yield return new WaitForSeconds(0.5f);
}
is there a hidden timeout on these guys ?
Answer by VickySmalley · Apr 28, 2017 at 11:17 AM
There is a possible workaround here: http://answers.unity3d.com/answers/1346539/view.html