Closed brandonramirez closed 9 years ago
Any feedback on this change? I don't like maintaining my own fork, so I hope this can be included in the mainline repository and part of the next release.
+1. Helps a lot.
+1. We found this ourselves. Its necessary for sockets to properly connect to servers running more than one dyno.
+1. This also resolves a lot of problems with 2 dyno's on Heroku. I have to force the socket.io client to use websocket
. Please merge this in.
Amazing, thanks guys! To solve the problem of 2 dyno's on Heroku, I had to use only "websocket" transports. Also in socket.io.js.h there was one argument missing (NSArray *transports) and I couldn't compile because of it
static NSString *socket_io_js_constructor(NSString *hostURL, BOOL reconnection, NSInteger attemptLimit, NSTimeInterval reconnectionDelay, NSTimeInterval reconnectionDelayMax, NSTimeInterval timeout, NSArray *transports) {
...
}
Exactly, the transports
need to be on websockets
to not let it fail connecting. The cause of it can be because of the long polling functionality on the beginning. The router fails to keep it on one web dyno.
On Saturday, Feb 14, 2015 at 12:04 PM, frandrzej notifications@github.com, wrote:
Amazing, thanks guys! To solve the problem of 2 dyno's on Heroku, I had to use only "websocket" transports. Also in socket.io.js.h there was one argument missing (NSArray *transports) and I couldn't compile because of it
static NSString socket_io_js_constructor(NSString hostURL, BOOL reconnection, NSInteger attemptLimit, NSTimeInterval reconnectionDelay, NSTimeInterval reconnectionDelayMax, NSTimeInterval timeout, NSArray *transports) { ... }
— Reply to this email directly or view it on GitHub.
Resolves #35