New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cb firing multiple times #50

Open
lperrin opened this Issue Dec 6, 2012 · 2 comments

Comments

Projects
None yet
2 participants
@lperrin
Collaborator

lperrin commented Dec 6, 2012

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

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.

@felixge

This comment has been minimized.

Show comment
Hide comment
@felixge

felixge Dec 6, 2012

Owner

@lperrin I just made you a contributor on github, feel free to push your suggested fix!

Owner

felixge commented Dec 6, 2012

@lperrin I just made you a contributor on github, feel free to push your suggested fix!

@lperrin

This comment has been minimized.

Show comment
Hide comment
@lperrin

lperrin Dec 7, 2012

Collaborator

I'll do that, thanks :)

Collaborator

lperrin commented Dec 7, 2012

I'll do that, thanks :)

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