Couchbase Lite 1.2 CBLReplication Pull stuck at status 3 in airport mode

Hello,
When I keep my iPhone in Airport mode and start the pull replication it gets stuck at status 3.
Ideally it should be stopped or at lease populate the lastError.
I am using OneShot Pull replication. Waited for long but it is not even timed-out

iOS Couchbase Lite version 1.2.0
After enabling logs I found that replication is marked active even though it knows that network is down. Is it expected?

Logs:
2016-04-15 13:18:32.036 Kamero[5512:3335765] Sync: CBLReplication[from http://163.172.144.44:4984/kamero]: active, progress = 0 / 0, err: (null)
2016-04-15 13:18:32.045 Kamero[5512:3335806] CBLSocketChangeTracker[0x14cd41f40 kamero]: Connection error #1, retrying in 2.0 sec: The operation couldn’t be completed. Network is down
2016-04-15 13:18:34.061 Kamero[5512:3335806] CBLSocketChangeTracker[0x14cd41f40 kamero]: Connection error #2, retrying in 4.0 sec: The operation couldn’t be completed. Network is down
2016-04-15 13:18:38.077 Kamero[5512:3335806] CBLSocketChangeTracker[0x14cd41f40 kamero]: Connection error #3, retrying in 8.0 sec: The operation couldn’t be completed. Network is down
2016-04-15 13:18:46.093 Kamero[5512:3335806] CBLSocketChangeTracker[0x14cd41f40 kamero]: Connection error #4, retrying in 16.0 sec: The operation couldn’t be completed. Network is down
2016-04-15 13:19:02.106 Kamero[5512:3335806] CBLSocketChangeTracker[0x14cd41f40 kamero]: Connection error #5, retrying in 32.0 sec: The operation couldn’t be completed. Network is down

@jens Can someone please reply?

A one-shot replication should eventually time out. Please file an issue on Github.

Hi @jens,
It does times out but after long time i suppose. The problem is if

  1. replication started running when there is no internet
  2. after 8 retries, replication is now will retry after 256 seconds,
  3. Internet is back
  4. Still replication is going to wait for 256 full seconds.

Ideally when there is change in reachability replication should immediately retry rather than waiting.

Makes sense. Please file an issue!

Raised #1326 for this one.

@pvaghasi @jens Any chance a work-around for this is known? Is there an observable property thats exposed that I could use to detect this situation?

I believe this is an issue @pasin fixed in 1.4.

@jens it appears to partially(?) be addressed in 1.4 ios client. While in the wait timer state (i.e. 64s), I disabled airplane mode after ~30 seconds and immediately saw a reachability state change notice in the log from the cbl client; but my pull replicator appeared to wait out the complete ~64s before retrying and successfully replicating. – FYI