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