felixge / felixge/node-couchdb

removeDoc closes socket?

Open
#48 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
363
Forks
68
PR merge metrics
No merged PRs in 30d

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)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.