Skip to content

Commit

Permalink
Merge branch 'remote-close-fix'
Browse files Browse the repository at this point in the history
  • Loading branch information
cboden committed Apr 14, 2016
2 parents d047758 + 02c2031 commit 67acb1f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/WebSocket.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ function() use ($reusableUAException) {
}
});

$stream->on('close', $this->_close);
$stream->on('close', function () {
$close = $this->_close;
$close(Frame::CLOSE_ABNORMAL, 'Underlying connection closed');
});

$stream->on('error', function($error) {
$this->emit('error', [$error, $this]);
Expand Down

0 comments on commit 67acb1f

Please sign in to comment.