node-imap icon indicating copy to clipboard operation
node-imap copied to clipboard

Error: This socket has been ended by the other party

Open lz-ui opened this issue 4 years ago • 4 comments

`[connection] Ended [connection] Error: Error: This socket has been ended by the other party events.js:287 throw er; // Unhandled 'error' event ^

Error: This socket has been ended by the other party at Socket.writeAfterFIN [as write] (net.js:452:14) at JSStreamSocket.doWrite (internal/js_stream_socket.js:170:19) at JSStream.onwrite (internal/js_stream_socket.js:28:57) at TLSSocket.Socket._final (net.js:415:28) at callFinal (_stream_writable.js:609:10) at processTicksAndRejections (internal/process/task_queues.js:84:21) Emitted 'error' event on Connection instance at: at TLSSocket._onError (C:\Users\admin\Desktop\node-imap\node_modules\imap\lib\Connection.js:151:10) at TLSSocket.emit (events.js:310:20) at TLSSocket._emitTLSError (_tls_wrap.js:873:10) at JSStreamSocket. (_tls_wrap.js:805:36) at JSStreamSocket.emit (events.js:310:20) at Socket. (internal/js_stream_socket.js:58:38) at Socket.emit (events.js:310:20) at emitErrorNT (net.js:1340:8) at processTicksAndRejections (internal/process/task_queues.js:84:21) { code: 'EPIPE', source: 'socket' }`

"imap": "^0.8.19"

node: v12.16.3

lz-ui avatar Sep 06 '21 16:09 lz-ui

Do you have a particular question?

mscdex avatar Sep 06 '21 17:09 mscdex

Hello, I do have the same problem, it makes my Node server crash, and I don't know how to stop this event to happen, I tried to add options such as keepalive but it does not solve my problem. Thanks

SDStash avatar Dec 23 '21 10:12 SDStash

@AlexandreLemoine40 Add an 'error' event handler and handle the error as you see fit.

mscdex avatar Dec 23 '21 10:12 mscdex

How can i restart the imap whenever i encounter this error? Is there any example for same?

gagan-smarter-codes avatar Sep 26 '23 04:09 gagan-smarter-codes