code: function (cb) {
      if (done || !localSentWants || !localSentHeads || !remoteSentWants || !remoteSentHeads) return cb()
      done = true
      if (!live) return stream.finalize(cb)
      sendChanges()
      cb()
    }
docs: Check if replication is finished.