Closed j3k0 closed 9 years ago
Wouldn't it be better to just reply with HTTP 408 Request Timed Out (restify.RequestTimeoutError
), so client knows he should resend its long polling request?
I'd better send a success code 200 here.
Why?
In case of any non success (2xx) reply, the client will wait an increasing number of seconds before retrying. In case of a successful reply (empty or not), the client will re-poll immediately.
Then, we will have to do an exception for the 408 status reply.
Problems will occur if we're not able to differentiate between the unexpected timeout and expected timeout. If the server is overloaded, there will be an unexpected timeout, registry's proxy will reply with a 408 status already.
For now, it seems to returns