Skip to content

removeDoc closes socket? #48

Description

Trying to delete a load of docs in a loop, the first works but then it throws:

db.request('/_design/my-view', query, function(err, data) {
    data.rows.forEach(function (e) {
        db.removeDoc(e.doc._id, e.doc._rev, console.log);
    });
});

output:

null { ok: true,
  id: '90a8b799188655eb73656f01818a91fe',
  rev: '2-79f3763a77a0749f6290f6db2733d50f' }

events.js:66
        throw arguments[1]; // Unhandled 'error' event
                       ^
    Error: socket hang up
        at createHangUpError (http.js:1263:15)
        at Socket.socketOnEnd [as onend] (http.js:1351:23)
        at TCP.onread (net.js:418:26)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions