Skip to content

Commit eb6f00c

Browse files
committed
Nginx 1.9.1 support (untested)
1 parent 8407802 commit eb6f00c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/ngx_http_accounting_worker_process.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,11 @@ ngx_http_accounting_handler(ngx_http_request_t *r)
108108
state = r->upstream_states->elts;
109109
if (state[0].status) {
110110
// not even checking the status here...
111-
upstream_req_latency_ms = (state[0].response_sec * 1000 + state[0].response_msec);
111+
#if (nginx_version > 1009000)
112+
upstream_req_latency_ms = state[0].response_time;
113+
#else
114+
upstream_req_latency_ms = (state[0].response_sec * 1000 + state[0].response_msec);
115+
#endif
112116
}
113117
}
114118
// TODO: key should be cached to save CPU time

0 commit comments

Comments
 (0)