Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix a bug with ngx_tcp_next_upstream()

  • Loading branch information...
commit 273be4a81776ff8fbbfa0964f90ab1edab3114f1 1 parent 5df3265
Weibin Yao(姚伟斌) authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 ngx_tcp_upstream.c
4 ngx_tcp_upstream.c
View
@@ -464,6 +464,10 @@ ngx_tcp_upstream_next(ngx_tcp_session_t *s, ngx_tcp_upstream_t *u,
ngx_log_debug1(NGX_LOG_DEBUG_TCP, s->connection->log, 0,
"tcp next upstream, fail_type: %xi", ft_type);
+ if (ft_type != NGX_TCP_UPSTREAM_FT_NOLIVE) {
+ u->peer.free(&u->peer, u->peer.data, NGX_PEER_FAILED);
+ }
+
if (ft_type == NGX_TCP_UPSTREAM_FT_TIMEOUT) {
ngx_log_error(NGX_LOG_ERR, s->connection->log, NGX_ETIMEDOUT,
"upstream timed out");
Please sign in to comment.
Something went wrong with that request. Please try again.