Permalink
Browse files

fixed a connection leak caused by an extra r->main->count++.

  • Loading branch information...
1 parent ce75f63 commit 8239c188ce7a4344e254e10e6b0ff285b81a2b0f @agentzh agentzh committed Dec 7, 2009
Showing with 648 additions and 14 deletions.
  1. +3 −9 src/ngx_http_memc_handler.c
  2. +639 −0 test/lib/Test/Nginx/Socket.pm
  3. +4 −3 test/t/storage.t
  4. +2 −2 util/build.sh
@@ -334,12 +334,6 @@ ngx_http_memc_handler(ngx_http_request_t *r)
return rc;
}
-#if defined(nginx_version) && nginx_version >= 8011
-
- r->main->count++;
-
-#endif
-
return NGX_DONE;
}
}
@@ -350,14 +344,14 @@ ngx_http_memc_handler(ngx_http_request_t *r)
return rc;
}
- ngx_http_upstream_init(r);
-
#if defined(nginx_version) && nginx_version >= 8011
- r->main->count++;
+ r->main->count++;
#endif
+ ngx_http_upstream_init(r);
+
return NGX_DONE;
}
Oops, something went wrong.

0 comments on commit 8239c18

Please sign in to comment.