-
Notifications
You must be signed in to change notification settings - Fork 830
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
Client connecting multiple times when proxied through nginx #36
Comments
I have no idea how to set up nginx, can you provide a server that does this? Also, does this work with the javascript client correctly? |
sure, i can. is there a way to send a private message to you? |
yes it works with javascript and also works with https://github.com/pkyeck/socket.IO-objc correctly |
sent. |
Seems to be some kind of race condition with polling |
Workaround - have it force WebSockets let socket = SocketIOClient(socketURL: "localhost:8080", options: ["forceWebsockets": true]) |
Actually it looks like nginx is doing some kind of caching? |
i have turned off the proxy buffering off if i connect using https://github.com/pkyeck/socket.IO-objc nginx config
|
I'll try to fix it tomorrow. Basically it's trying to poll constantly and getting a reply each time. |
OK great. thanks. it is a really basic setup.
|
It is a cache problem. |
thanks for the patch, it seems to be better, connections come to node instance only once. But nginx still gets multiple requests. Is this OK?
|
THANK YOU SO MUCH |
Sometimes it connects more than 3 times. If I connect directly to the socket.io it connects only once.
multiple connects:
Objective-C client code:
nginx config:
The text was updated successfully, but these errors were encountered: