Skip to content

Commit

Permalink
donot write when http client closed
Browse files Browse the repository at this point in the history
  • Loading branch information
im-pingo committed May 12, 2021
1 parent 03b481d commit 1e68e9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ openresty/
.DS_Store
h5player/
.vscode/
nginx/
source/
rpmbuild/
4 changes: 2 additions & 2 deletions modules/nginx-client-module/ngx_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -608,15 +608,15 @@ ngx_client_write_handler(ngx_event_t *ev)
c = ev->data;
s = c->data;

if (c->destroyed) {
if (c->destroyed || s->closed) {
return;
}

ngx_log_debug0(NGX_LOG_DEBUG_CORE, &s->log, 0,
"nginx client write handler");

if (!s->connected) {
ngx_client_close(s);
ngx_client_connected(s);

return;
}
Expand Down

0 comments on commit 1e68e9f

Please sign in to comment.