javascript - How to force Atmosphere.js to use the preferred transport when reconnecting to the Server? -
when preferred transport fails, atmosphere tries use fallback transport. tried reconnect maxreconnect times. after calls onclose , onerror. when try subscribe again atmosphere uses fallback transport connection. here client configuration: atmosphererequestconfig jsonrequestconfig = // ... jsonrequestconfig.settransport(atmosphererequestconfig.transport.websocket); jsonrequestconfig.setfallbacktransport(atmosphererequestconfig.transport.long_polling); jsonrequestconfig.setloglevel("debug"); jsonrequestconfig.setmaxreconnectonclose(1); atmosphere atmosphere = atmosphere.create(); clientrequest = atmosphere.subscribe(jsonrequestconfig); when server running , client connects first time (page reload) connection on websockets. stopped server client shows this: atmosphere.js:3252 sat jan 30 2016 22:17:14 gmt+0100 (cet) atmosphere: websocket.onclose atmosphere.js:3252 websocket closed, reason: normal closure; connection completed whatever purpose created. - wasclean: t...