Open nkman opened 7 years ago
This seems like a reasonably straightforward issue, is there a reason it hasn't been addressed?
[Edited comment, since I read the issue date incorrectly. Sorry.]
@rickhall the fix is marked as temp, what would a more permanent solution look like? Why is this.socket null?
Good question. I noticed it in a similar situation where the connection was open for a while. I assumed it was some sort of connection reset or timeout, but I didn't see any such error being logged. It is not something I can easily recreate.
Not that this will be too helpful, but it just happened to me again after leaving the connection open for a long time. I get an empty error from the logger error() and the connection onerror() callbacks. However, the error seems to be a symptom of attempting to invoke send() on a null socket, since the error is printed after the stack trace in Chrome and there is no socket error before that.
Is it possible that the socket has an error and tearDown() gets called and sets socket to null without reporting anything? The code includes:
this.socket.onclose = this.socket.onerror = tearDown; // we don't really care about the error here
Yeah, my last comment probably doesn't make any sense, since the tearDown assignment only happens when closing the connection.
So, I'm back to "I don't know". :-)
Any news?
We scan thousands of imap all the time and we regularly has this error (a few times per day).
We applied the "temp fix" , thanks @nkman, but it would be nice to be handled by the lib directly
For connections made for long time, FETCHing (or doing any send operation) causes the crash. The logs written below.