Changed my client to call res.connection.end() at the end of its request 
callback and now my server fires a res.connection 'close' event and I do a 
process.exit and it appears to work but this seems like a hack ...

Ted 

On Thursday, October 10, 2013 10:06:16 AM UTC-5, tedx wrote:
>
> None of those fire :(
>
> Ted
>
> On Thursday, October 10, 2013 9:19:45 AM UTC-5, Ben Noordhuis wrote:
>>
>> On Thu, Oct 10, 2013 at 4:07 PM, tedx <[email protected]> wrote: 
>> > One other issue is that the service needs to terminate after servicing 
>> the 
>> > request if after res.end() I call process.exit the client get a socket 
>> > hangup error so I tried: 
>> >     req.connection.on('end', function() { 
>> >         process.exit(exitCode) 
>> >     }); 
>> > 
>> > but then the service process never terminates. How does the service 
>> know the 
>> > client has gotten the response and it can exit? 
>> > 
>> > Ted 
>>
>> You probably want res.on('end'), res.on('close') or 
>> res.connection.on('finish').  No shortage of events, eh? :-) 
>>
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
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].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to