Skip to content
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

Client side 'connectTimeout' parameter doesn't work when WebSocket is opened but messages are blocked #1844

Closed
dmitry-treskunov opened this issue Jan 27, 2015 · 0 comments
Labels

Comments

@dmitry-treskunov
Copy link
Contributor

From the https://groups.google.com/forum/#!topic/atmosphere-framework/IKkyYlFxlk8:

Usually, the first message sent using WebSocket looks like 40|48d70d7a-ac1b-41c9-b68a-818d0c451bee|0||.

On the javascript side the idea is that connection is opened only when such message is received.

I use 'connectTimeout' parameter and I expect that if the first message was not received in this timeout, then onTransportFailure will be called. But it's not, because (looking through the atmosphere.js code) websocket's onopen callback clears timeout function:

_websocket.onopen = function (message) {
    _timeout(_request);
    ...
};
function _timeout(_request) {
    clearTimeout(_request.id);
    ...
}

It can be reproduced in case of some antivirus, firewall, proxy who allows WS connection, but doesn't pass frames.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants