Skip to content

Commit

Permalink
Make sure we only emit 'end' once
Browse files Browse the repository at this point in the history
  • Loading branch information
beaucollins committed Dec 20, 2012
1 parent a32c6cc commit ed4a849
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/Phluid/Request.php
Expand Up @@ -25,6 +25,7 @@ function __construct( HttpRequest $request ){

$request->on( 'end', function(){
if ( !$this->ended ) {
$this->ended = true;
$this->emit( 'end' );
}
});
Expand Down

0 comments on commit ed4a849

Please sign in to comment.