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
Android System.out: (ERROR): io.ably.lib.transport.WebSocketTransport: No activity for 25000ms, closing connection #306
Comments
Another customer reported this The lib sends a CLOSE and receives a CLOSED, but the websocket seems to stay open until the 25s activity timeout; which is odd, as realtime definitely disconnects websockets after it sends a CLOSED.
(also odd that the connection state would return to That's on 0.8.11, but customer gave a similar log for 1.0. |
Yes it will remain open forever. And the WebSocketTransport will report no activity etc forever. Seems like that thread maintaining activity just keeps on living. |
I've added 6899a02 which eliminates the commonly-seen error message "No activity for 25000ms, closing connection", where the timer was left running even after the WsClient was closed. I've also added 934b562 which has some tests to verify that the connectionmanager thread is exiting cleanly in various situations. @emilm I tried to reproduce what you're doing in your code but I've not been able to reproduce the situation in which the connectionmanager fails to exit. Are you able to provide any additional information which would help me reproduce it? Or a code sample? Thanks |
Hello! All I did was: `
}` ... `private void onConnectionStateChanged(ConnectionStateListener.ConnectionStateChange state) {
}` ... `public void close() {
}` In short: open() -> connect -> onConnected -> get 2 channels, subscribe to 1 of them -> close() |
and what context is Also, is this on Android or JRE, and which version? |
JRE 1.8 It's opened and closed on the main thread. But the executor inside open() is actually connecting I suppose. So that's a different thread in on itself. But the main thread closes. But that might change. |
I tried to replicate that (ie open in a new thread, close in the main thread) in this test: https://github.com/ably/ably-java/blob/master/lib/src/test/java/io/ably/lib/test/realtime/ConnectionManagerTest.java#L294 but in this case the thread exits without any problem :( |
BTW have you retried with this change: 6899a02 ? Before that fix, the dangling |
I haven't tried any of it so far. Is there a dev channel on bintray? Or do I have to compile and test myself? |
No, I haven't made a release with that fix yet. If you checkout the source you can build a fat jar with:
I will do a new release probably on Wednesday this week but it would be great if you are able to check it before then. |
Yes! That worked! Thank you! |
OK, great. I'm travelling tomorrow but I'll do a new release as soon as I get back. |
Are you back yet? I hope you can push out a new release soon, thanks! |
Hi @emilm. I'll check in with @paddybyers in the morning to see if we can get this pushed out. Sorry for the delay. |
Hello again... I hope this can be done today so I don't have to add a fat jar to the GIT source tree. :) |
Been promised it will happen today! @paddybyers is unfortunately flat out on something else, but this is next in his list |
Hi @emilm. Apologies for the delay, we're just swamped with things right now and our previous maintainer is not around, so only @paddybyers is really able to do this. We'll get this done as soon as he gets a chance to breath. |
I caved in and used the JAR file I compiled myself. But it would be nice to get it in this week or something! |
Would STILL be nice with using bintray instead of a local jar though ;) |
This is released in 1.0.1 (https://bintray.com/ably-io/ably/ably-java/1.0.1, https://bintray.com/ably-io/ably/ably-android/1.0.1) |
No description provided.
The text was updated successfully, but these errors were encountered: