Skip to content

Commit 9726dc6

Browse files
committed
add back remove old conns
1 parent f6a96f0 commit 9726dc6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ngx_http_upstream_serverlist.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,7 +1209,7 @@ refresh_upstream(serverlist *sl, ngx_str_t *body, ngx_log_t *log) {
12091209
dump_serverlist(new_sl);
12101210

12111211
serverlist *old_sls = mcf->serverlists.elts;
1212-
//service_conn *old_scs = mcf->service_conns.elts;
1212+
service_conn *old_scs = mcf->service_conns.elts;
12131213
ngx_uint_t i;
12141214

12151215
for (i = 0; i < mcf->serverlists.nelts; i++) {
@@ -1223,10 +1223,10 @@ refresh_upstream(serverlist *sl, ngx_str_t *body, ngx_log_t *log) {
12231223
old_sls[i].new_pool = NULL;
12241224
}
12251225

1226-
/*if (old_scs[i].peer_conn.connection) {
1226+
if (old_scs[i].peer_conn.connection) {
12271227
ngx_close_connection(old_scs[i].peer_conn.connection);
12281228
old_scs[i].peer_conn.connection = NULL;
1229-
}*/
1229+
}
12301230
}
12311231

12321232
if (old_servers != NULL) {

0 commit comments

Comments
 (0)