imap.end() causes [Error: read ECONNRESET]
See original GitHub issueI have the following function :
ImapService.prototype.disconnect = function(callback) {
callback = callback || function(){}
this.imap.end();
this.imap.once('end', function(){
callback();
});
}
When this is called, 9/10 times it throws the error:
{ [Error: read ECONNRESET] code: ‘ECONNRESET’, errno: ‘ECONNRESET’, syscall: ‘read’, source: ‘socket’ }
I have an active connection and have been able to successfully pull messages from the IMAP server.
I understand I can capture error events and handle them. This should not be a solution though. I need to understand why this error is getting thrown and prevent it. I have read through the code and can not find any reasonable explanation.
Any insight into this issue?
Issue Analytics
- State:
- Created 9 years ago
- Comments:14 (5 by maintainers)
Top Results From Across the Web
Node IMAP ECONNRESET with Mail-in-a-box email
When I create an IMAP connection with node-imap module with a Mail-in-a-box (MIAB) email, after a few minutes, I get the ECONNRESET error....
Read more >nodemailer/nodemailer - Gitter
I try to send a mail after saving data to a mongodb with mongoose. Nothing happens. No error message. The app just pauses....
Read more >IMAP email node trigger problem - Questions
I have the following problem: Error: read ECONNRESET at TCP. ... Emitted 'error' event on ImapSimple instance at: at Connection.
Read more >Issue 30319: Change socket.close() to ignore ECONNRESET
close() fails with "ConnectionResetError: [Errno 54] Connection reset by peer" in imaplib? Is that a new error? Should imaplib catch ...
Read more >read econnreset at tcp.onstreamread (node:internal ...
See here more about the error itself. It's simply a connection error. Why the connection fails is most likely because that insert is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi,
I had similar issue and someone else had similar issue, which was caused by tls settings. Try to change tls true to following
source: http://stackoverflow.com/a/17583844
I’ve had the same problem… I ended up doing this: