We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8407802 + 964189c commit 21e7872Copy full SHA for 21e7872
src/ngx_http_accounting_worker_process.c
@@ -2,6 +2,7 @@
2
#include <ngx_core.h>
3
#include <ngx_http.h>
4
#include <ngx_http_upstream.h>
5
+#include <nginx.h>
6
7
#include <syslog.h>
8
@@ -108,7 +109,11 @@ ngx_http_accounting_handler(ngx_http_request_t *r)
108
109
state = r->upstream_states->elts;
110
if (state[0].status) {
111
// not even checking the status here...
- upstream_req_latency_ms = (state[0].response_sec * 1000 + state[0].response_msec);
112
+ #if (nginx_version < 1009000)
113
+ upstream_req_latency_ms = (state[0].response_sec * 1000 + state[0].response_msec);
114
+ #else
115
+ upstream_req_latency_ms = state[0].response_time;
116
+ #endif
117
}
118
119
// TODO: key should be cached to save CPU time
0 commit comments