Can't stop replicator if socket take long time to response


Today I use cblite ce android 2.8.4

How can safe stop replicator if socket take long time or not to response ?

My solution is “stop replicator, wait replicator to stop (max 10 sec), clear memory”.
But with this solution, if I want to start a another replicator, I can have 1,2, 3,… n leak replicator.

I can downgrade the heartbeat time in replicator but I don’t known what can happen with that ?

Best regards.

I think that the issue that you are trying to address would be handled best by adjusting the timeout and max-retries for the replicator. The replicator code is much closer to the network and much more able to handle this kind of issue than you will be able to, with the blunt instrument of starting and stopping the replicator.

Do you know why the socket is taking a long time to “respond”? That might be a good places to start.

Hi @blake.meike

The socket can take long time to respond when mobile loose network.
My customer’s product issue when they’re entered in area without network available.
I product it when I’m going up on the stairs in my office.
I found an android emulator where you can product easy with airplane mode (in this emulator, the airplane mode don’t close socket). It’s a Galaxy Nexus on android 5.1 (API 22). It’s available in android studio.

Sure! This is an absolutely normal issue, on a mobile platform.

What, exactly, would you like to do, when the device loses connectivity? I think there are enough controls at the Core level, so that you should be able to configure it to do what you want, without trying to to manipulate it from the application…