Skip to content

Conversation

qevni
Copy link

@qevni qevni commented Jan 4, 2020

Couple of issues which made it very hard to stop and start an express-pouchdb server with active replications in defined in a _replicator document.

  • in replicator.js, the db variable was never set, so undefined for db.stopReplicatorDaemon
  • callAsyncRecursive typically stops on the first daemon, since it doesn't have a stop method, and thus func[0] === undefined
  • The promises set up after replication completion in pouchch-replication fire up right after the daemon gets shut down, and throw exceptions on missing db within dbData.dbs which is empty, when trying to clean up the replication (which already has been cleaned when shutting the daemon down).
    Open to better ways to do this. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant