-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Labels
Description
When the app goes offline and returns online, the replication resumes and docs are replicated. But the _active_tasks endpoint on the listener still returns the error as shown below, as if the app was still offline. The _active_tasks endpoint is often used in apps built with the Listener API to display a connection status indicator. And the error property in the response can be used to show that sync is currently paused/offline.
This can be reproduced with liteserv-android (kick off continuous replication, check _active_tasks response, go offline or stop sync gateway, go back online, check _active_tasks and replication should resume).
$ curl 'http://localhost:5984/_active_tasks'
[
{
"source":"http://localhost:4984/sync_gateway",
"task":"repl002",
"status":"Idle",
"progress":100,
"continuous":true,
"target":"cblite-test",
"error":
[
400,
"org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:4984 refused"
],
"type":"Replication"
}
]