Atmosphere / atmosphere-javascript

atmosphere-javascript
Apache License 2.0
122 stars 98 forks source link

When to set closeAsync to true? #221

Closed JonathanAquino closed 5 years ago

JonathanAquino commented 7 years ago

Could you add some guidance to the docs at https://github.com/Atmosphere/atmosphere/wiki/atmosphere.js-API about when to set closeAsync to true?

59 says "Close request must be sent synchronously".

But then #108 says "Allow application to configure the close request async or not".

I would like to set closeAsync to true because I find that if I try to close the connection when I am offline, the js hangs.

But I'm not sure if this would be ok because #59 says "Close request must be sent synchronously".

I'm confused!

thomasreiser commented 7 years ago

@JonathanAquino fyi, I have created #225 which drops the support for sync XHR. I am currently investigating if the requirements of #59 are still there or if it is obsolete now with the new browser versions.