Closed ziacik closed 9 years ago
Can you create a PR to switch the order of the transports.
Also, angular-sails tells sails.io to not auto connect, and only initializes the connection when the $sails
service is invoked. This allows for angular-sails to pass the configs to sails.io
Hi. In default config for angular-sails provider, there are transports set like this
transports: ['websocket', 'polling']
I believe it shoud be like this
transports: ['polling', 'websocket']
so that at first polling is tried and only after that probing for websocket upgrade starts. If websockets are configured first and they are blocked by proxy, io will never fallback to polling. I have worked this around by setting the transports explicitly in provider config.
Also, I think that sails.io tries to connect to socket at app startup and it does some kind of connection caching thus making angular-sails transport config ineffective.