-
Notifications
You must be signed in to change notification settings - Fork 0
/
2.diff
29 lines (25 loc) · 873 Bytes
/
2.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- /usr/src/nginx/src/http/modules/ngx_http_upstream_ip_hash_module.c 2018-11-27 14:56:38.000000000 +0200
+++ /usr/src/nginx/src/http/modules/ngx_http_upstream_ip_hash_module.c 2018-11-27 16:18:55.328725454 +0200
@@ -9,6 +9,9 @@
#include <ngx_core.h>
#include <ngx_http.h>
+#if (NGX_HTTP_UPSTREAM_CHECK)
+#include "ngx_http_upstream_check_module.h"
+#endif
typedef struct {
/* the round robin data must be first */
@@ -208,6 +211,15 @@
goto next;
}
+#if (NGX_HTTP_UPSTREAM_CHECK)
+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0,
+ "get ip_hash peer, check_index: %ui",
+ peer->check_index);
+ if (ngx_http_upstream_check_peer_down(peer->check_index)) {
+ goto next;
+ }
+#endif
+
if (peer->max_fails
&& peer->fails >= peer->max_fails
&& now - peer->checked <= peer->fail_timeout)