felixge / felixge/node-couchdb

cb firing multiple times

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

Description

Near line 178, this code doesn't set cbFired to true:

``` javascript
onError = function(reason) {
if (!cbFired && typeof cb === 'function') {
cb(new Error(reason));
}
},
onClose = function() {
if (!cbFired && typeof cb === 'function') {
cb();
}
},
```

If a TCP error occurs, the callback is called twice.

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.