-
-
Notifications
You must be signed in to change notification settings - Fork 756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[atmosphere.js] Cannot set client request timeout and get WebSocket error #860
Comments
Hi,
Thanks! |
I'm using chrome, version: 24.0.1312.56 m. OS: win7. I'm giving a simplified version test case ( already tried on my own PC).
Client:
The console log: Request opened Websocket closed, reason: Connection was closed abnormally (that is, with no close frame being sent). jquery.atmosphere.js:2435 Websocket closed, wasClean: false jquery.atmosphere.js:2435 Request onClose Request reconnected |
What will happen if the client request some forbidden resources? Eg, when the server rejected with a 403 code, I would like to do some operations but not reconnect again, but each time I check the status of the response, it's 200. |
@ZoePan If the websocket fail to connect (503 or anything else), the onOpen will not be called. Where do you get 403? |
Thanks for your reply and looking into on this. I will figure out the status code next time if I meet that again. |
Similar with issue: #291
I'm using client version 1.0.9.
I configured the timeout for the request (for some debug) as the following:
var request = {
timeout: 60000,
url : URL,
contentType : "application/json",
shared : true,
transport : "websocket",
fallbackTransport: "long-polling",
};
But seems the client does not automatically timeout after 60 seconds, it only aborted after 300 seconds as default. Speaking about the abort, it's some warning message:
Websocket closed, reason: Connection was closed abnormally (that is, with no close frame being sent). jquery.atmosphere.js:2435
Websocket closed, wasClean: false jquery.atmosphere.js:2435
Request reconnected
I have searched the above error, you have mentioned in other tickets that it may caused by proxy or firewall, but the error always repeats after 5 mins, which is the default timeout. Is there any relationship between this error and the timeout? Mine output msg is different with #291. It shows close reason for idle time, but here is something abnormal, any idea? Reply is appreciated.
Thanks,
Zoe
The text was updated successfully, but these errors were encountered: