Skip to content

Commit

Permalink
bugfix: the write event timer might not be removed in time in ngx.flu…
Browse files Browse the repository at this point in the history
…sh(true) when ngx_handle_write_event failed.
  • Loading branch information
agentzh committed Sep 25, 2012
1 parent d3e2e64 commit 2bea026
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ngx_http_lua_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,9 @@ ngx_http_lua_ngx_flush(lua_State *L)
}

if (ngx_handle_write_event(wev, clcf->send_lowat) != NGX_OK) {
if (wev->timer_set) {
ngx_del_timer(wev);
}
return luaL_error(L, "connection broken");
}

Expand Down

0 comments on commit 2bea026

Please sign in to comment.