Permalink
Browse files

fix the wrong timeout meanings with proxy_read_timeout and proxy_send…

…_timeout
  • Loading branch information...
1 parent a40c99a commit d871a83352ae83e8d3ec689a039e530ddce103d2 @yaoweibin committed Jul 10, 2012
Showing with 4 additions and 4 deletions.
  1. +2 −2 modules/ngx_tcp_generic_proxy_module.c
  2. +2 −2 modules/ngx_tcp_websocket_proxy_module.c
@@ -509,9 +509,9 @@ ngx_tcp_proxy_handler(ngx_event_t *ev)
if (c == pctx->upstream->connection) {
if (ev->write) {
- ngx_add_timer(c->read, pcf->upstream.read_timeout);
- } else {
ngx_add_timer(c->write, pcf->upstream.send_timeout);
+ } else {
+ ngx_add_timer(c->read, pcf->upstream.read_timeout);
}
}
@@ -1050,9 +1050,9 @@ ngx_tcp_websocket_proxy_handler(ngx_event_t *ev)
if (c == wctx->upstream->connection) {
if (ev->write) {
- ngx_add_timer(c->read, wcf->upstream.read_timeout);
- } else {
ngx_add_timer(c->write, wcf->upstream.send_timeout);
+ } else {
+ ngx_add_timer(c->read, wcf->upstream.read_timeout);
}
}

0 comments on commit d871a83

Please sign in to comment.