My question is different. Should destroy() be enough already? In the 
context of the node-imap ticket I linked to. IMHO it should be enough - but 
the process hangs! Test app: a batch node.js app that connects to an IMAP 
server (gmail) with deliberately wrong credentials, causing an error on 
login, causing this line to be executed:

https://github.com/mscdex/node-imap/blob/master/lib/Connection.js#L1594

NOTE THAT THIS HAS JUST BEEN PATCHED because of my bug report, using my 
solution - until an hour ago that line said "destroy()" which left the 
node.js process hanging. With end() I get my command line back, after all, 
the node.js app has finished, nothing left to do.

I think it is a bug that destroy() does not work?



On Thursday, July 16, 2015 at 9:02:07 PM UTC+2, Fedor Indutny wrote:
>
> Hello!
>
> You may want to give a try to: socket.destroySoon(). socket.destroy() - is 
> supposed to kill the socket as soon as possible.
>
> On Thu, Jul 16, 2015 at 11:49 AM, 'Michael Hasenstein' via nodejs <
> [email protected] <javascript:>> wrote:
>
>> Because I think it should, but it doesn't, see this issue I debugged in 
>> node-imap today:
>>
>> https://github.com/mscdex/node-imap/issues/452#issuecomment-122023433
>>
>> Basically, calling socket.destroy() did not end the connection. I had to 
>> add a socket.end() in front to make it work.
>>
>>  -- 
>> Job board: http://jobs.nodejs.org/
>> New group rules: 
>> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
>> Old group rules: 
>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "nodejs" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/nodejs/ae7c8c44-d545-4522-a66f-33df378bbd38%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/nodejs/ae7c8c44-d545-4522-a66f-33df378bbd38%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/fa70d30a-bf13-474c-8350-4a495ce8b714%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to