summaryrefslogtreecommitdiff
path: root/src/stream/ngx_stream_proxy_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stream/ngx_stream_proxy_module.c')
-rw-r--r--src/stream/ngx_stream_proxy_module.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/stream/ngx_stream_proxy_module.c b/src/stream/ngx_stream_proxy_module.c
index 81a0891de..a6b4f7e2e 100644
--- a/src/stream/ngx_stream_proxy_module.c
+++ b/src/stream/ngx_stream_proxy_module.c
@@ -1677,13 +1677,17 @@ ngx_stream_proxy_next_upstream(ngx_stream_session_t *s)
u = s->upstream;
pc = u->peer.connection;
- if (u->upstream_out || u->upstream_busy || (pc && pc->buffered)) {
+ if (pc && pc->buffered) {
ngx_log_error(NGX_LOG_ERR, s->connection->log, 0,
- "pending buffers on next upstream");
+ "buffered data on next upstream");
ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR);
return;
}
+ if (s->connection->type == SOCK_DGRAM) {
+ u->upstream_out = NULL;
+ }
+
if (u->peer.sockaddr) {
u->peer.free(&u->peer, u->peer.data, NGX_PEER_FAILED);
u->peer.sockaddr = NULL;