Skip to content

Commit

Permalink
bugfix: handler was called twice in a row when in loop mode
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzcpan committed Apr 3, 2012
1 parent 4d0299d commit c872faf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/http/modules/perl/ngx_http_perl_module.c
Expand Up @@ -2784,9 +2784,10 @@ ngx_perl_read_handler(ngx_event_t *ev)
ngx_perl_close(c);
break;
case NGX_PERL_READ:
ngx_perl_read(c);
if (c->read->ready) {
goto AGAIN;
} else {
ngx_perl_read(c);
}
break;
case NGX_PERL_WRITE:
Expand Down Expand Up @@ -2937,9 +2938,10 @@ ngx_perl_write_handler(ngx_event_t *ev)
ngx_perl_read(c);
break;
case NGX_PERL_WRITE:
ngx_perl_write(c);
if (c->write->ready) {
goto AGAIN;
} else {
ngx_perl_write(c);
}
break;
case NGX_PERL_SSL_HANDSHAKE:
Expand Down

0 comments on commit c872faf

Please sign in to comment.