Skip to content

Commit 21e7872

Browse files
committed
Merge branch 'splitice-master'
2 parents 8407802 + 964189c commit 21e7872

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/ngx_http_accounting_worker_process.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include <ngx_core.h>
33
#include <ngx_http.h>
44
#include <ngx_http_upstream.h>
5+
#include <nginx.h>
56

67
#include <syslog.h>
78

@@ -108,7 +109,11 @@ ngx_http_accounting_handler(ngx_http_request_t *r)
108109
state = r->upstream_states->elts;
109110
if (state[0].status) {
110111
// not even checking the status here...
111-
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
112117
}
113118
}
114119
// TODO: key should be cached to save CPU time

0 commit comments

Comments
 (0)