[module] Tracking connection status from accepted to closed
Hung Nguyen
hungnv at opensource.com.vn
Sat Oct 28 10:23:48 UTC 2017
Hello,
I am writing a HTTP core module that track http connection to know when it’s accepted and closed within nginx.
What I am doing is register my module at PREACCESS_PHASE, and then adding a clean up callback to know when the connection closed (from nginx side).
The problem is from my module i see nginx’s calling it twice, and calling my ngx_http_cleanup_t implement twice also.
My question is: If I want to write my module to do exactly 2 things:
1. Know when connection accepted by nginx
2. and know when connection closed by nginx
How should i implement my module?
Thanks,
More information about the nginx-devel
mailing list