Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

FIX a bug of lack the patch with check_index

  • Loading branch information...
commit 8977af643b5ed2163df4becf7210c4b43287b4d5 1 parent e61fd0d
@yaoweibin authored
Showing with 22 additions and 1 deletion.
  1. +1 −1  ngx_tcp_upstream_round_robin.c
  2. +21 −0 tcp.patch
View
2  ngx_tcp_upstream_round_robin.c
@@ -492,7 +492,7 @@ ngx_tcp_upstream_get_round_robin_peer(ngx_peer_connection_t *pc, void *data)
if (!peer->down) {
- if (ngx_tcp_check_peer_down(peer->check_index)) {
+ if (!ngx_tcp_check_peer_down(peer->check_index)) {
if (peer->max_fails == 0
|| peer->fails < peer->max_fails)
View
21 tcp.patch
@@ -32,3 +32,24 @@ index b736aa2..0b1507b 100644
#define NGX_LOG_DEBUG_CONNECTION 0x80000000
#define NGX_LOG_DEBUG_ALL 0x7ffffff0
+diff --git a/src/event/ngx_event_connect.h b/src/event/ngx_event_connect.h
+index 6cad042..8371b55 100644
+--- a/src/event/ngx_event_connect.h
++++ b/src/event/ngx_event_connect.h
+@@ -32,6 +32,7 @@ typedef void (*ngx_event_save_peer_session_pt)(ngx_peer_connection_t *pc,
+ void *data);
+ #endif
+
++#define NGX_INVALED_INDEX (-1)
+
+ struct ngx_peer_connection_s {
+ ngx_connection_t *connection;
+@@ -42,6 +43,8 @@ struct ngx_peer_connection_s {
+
+ ngx_uint_t tries;
+
++ ngx_uint_t check_index;
++
+ ngx_event_get_peer_pt get;
+ ngx_event_free_peer_pt free;
+ void *data;
Please sign in to comment.
Something went wrong with that request. Please try again.