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

Socket is closed before connection RTT issue #445

Closed
stavsap opened this issue Jul 19, 2018 · 4 comments
Closed

Socket is closed before connection RTT issue #445

stavsap opened this issue Jul 19, 2018 · 4 comments

Comments

@stavsap
Copy link

stavsap commented Jul 19, 2018

when connecting on slow networks it seems that the socket connection is closed before the handshake is complete, what makes the connection to fail and try other transport protocols. (xhr streaming...)

i have modified the rtt value to some constant value of 10 sec (yes its a lot but just to see if it is the issue) and it seems to solve this problem.

is there any way to set the rtt or rto value before the connection is started?

from what i see in the sockjs.js file in the dist, the rtt is computed on run time and the rto is set accordingly.

i am using wss connectivity with angularjs and angular 5 projects with spring boot as backed server.

my deployment involves some vlans, vpns and also docker overlay network what might cause some slow networking in times, and the compute of the rto is not correct or too little.

it will be nice to have some way to manual set this values.

my current solution is a dirty work around involving modifying the dist sockjs.js file and integrate it to the project without npm.

please advise.

@brycekahle
Copy link
Contributor

Would #413 solve your issue?

@stavsap
Copy link
Author

stavsap commented Oct 8, 2018

no, i still manually modify rtt value in sockjs.js file.

@daniloarcidiacono
Copy link

@brycekahle Please fix this... there are already two PRs for the same problem:

#468
#460

When connecting to a SockJS service behind a reverse proxy, if said service is down then the client closes the connection before receiving the 502 Bad Gateway HTTP response.

@brycekahle
Copy link
Contributor

I believe this change will solve your problem 537352c

Please let me know if that isn't the case.

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

No branches or pull requests

3 participants