Skip to content

Commit

Permalink
Replicate "end" event from connection to input
Browse files Browse the repository at this point in the history
Fixes friends-of-reactphp#24 without throwing exception as in friends-of-reactphp#25
  • Loading branch information
blex18 committed Feb 11, 2015
1 parent 5cae9c0 commit 90cc358
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/React/Stomp/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ public function createClient(array $options = array())
$input->emit('error', array($e));
});

$conn->on('end', function ($e) use ($input) {
$input->emit('end', array($e));
});

return new Client($this->loop, $input, $output, $options);
}

Expand Down

0 comments on commit 90cc358

Please sign in to comment.