-
Notifications
You must be signed in to change notification settings - Fork 982
Possible Ack leak #446
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
Comments
Hello, did you solve it later? |
Hello, this was not resolved, we have done some kind of workaround to not rely on receiving the response |
Can you elaborate on that? I am very sad now. |
Nothing to elaborate really. Our fix is specific to our app and is not fixing the issue but rather the result logic. Previously we relied upon not losing an Ack (the normal case) and now we have worked on a separate confirmation logic by implementing our own timeout and retrying in case of an error. Still waiting for a fix to this |
Previously, getting disconnected while waiting for an acknowledgement would create a memory leak, as the acknowledgement was never received and the handler would stay in memory forever. See also: socketio/socket.io-client@34cbfbb Related: #446
We're using the socket.io-client v1.0.0 in our Android project. Having a connection open we've noticed sometimes when internet connectivity is lost the following error happens:
That leads to the socket getting disconnected, reason being transport error
The issue we've identified is upon a reconnection (once internet connectivity is available again) some of the registered Acks will never get notified (they remain indefinitely in the internal acks map in io.socket.client.Socket). It seems some of the packets for those Acks do not reach the server, in other cases they actually do but it's the response that gets lost.
These are our socket options:
IO.Options opts = new IO.Options(); opts.secure = true; opts.forceNew = true; opts.reconnection = true; opts.reconnectionAttempts = MAX_RECONNECTS; opts.reconnectionDelay = 2000; opts.transports = new String[]{"websocket"}; opts.upgrade = true; Socket socket = IO.socket(socketUrl, opts);
The text was updated successfully, but these errors were encountered: