Skip to content
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

Unhandled error ECONNREFUSED when tls is being used #467

Open
pravincar opened this issue Apr 5, 2015 · 4 comments
Open

Unhandled error ECONNREFUSED when tls is being used #467

pravincar opened this issue Apr 5, 2015 · 4 comments

Comments

@pravincar
Copy link

This happens only when tls:true was used in the constructor.

events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: connect ECONNREFUSED
    at exports._errnoException (util.js:746:11)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:983:19)
@mscdex
Copy link
Owner

mscdex commented Apr 5, 2015

Did you attach an error event handler?

@pravincar
Copy link
Author

Yeah. Snippet below.

var imap=new Imap({user:username,password:password,host:'localhost',port:9993,tls:true,tlsOptions:{rejectUnauthorized:false}});
imap.once('error', function(err) {
    console.log('imap error',err);
});

@mscdex
Copy link
Owner

mscdex commented Apr 5, 2015

I can only reproduce this with node v0.12.x. node v0.10 and latest iojs emit the error as expected.

It looks like a regression.

@mscdex
Copy link
Owner

mscdex commented Apr 5, 2015

Issue filed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants