Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement handle disconnects and reconnect when appropriate #3

Merged

Conversation

WyriHaximus
Copy link
Member

@WyriHaximus WyriHaximus commented Apr 5, 2017

$event = Event::createFromMessage($message);

if ($event->getEvent() === 'pusher:error') {
return Observable::fromPromise(reject(new PusherErrorException($event->getData()['message'], $event->getData()['code'])));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line exceeds 120 characters; contains 142 characters

*/
private function handleLowLevelError(Throwable $throwable)
{
if (!($throwable instanceof WebsocketErrorException) && !($throwable instanceof RuntimeException) && !($throwable instanceof PusherErrorException)) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line exceeds 120 characters; contains 157 characters

$observable = Observable::error($error, new ImmediateScheduler());
$client = new AsyncClient($observable);
$client->channel('test')->subscribe(
function () {},

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closing brace must be on a line by itself

$resolver->resolve('ws.pusherapp.com')->shouldBeCalled()->willReturn(reject($error));
$client = AsyncClient::create($loop, 'abc', $resolver->reveal());
$client->channel('test')->subscribe();
$loop->addTimer(1, function () {});

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closing brace must be on a line by itself

*/
private function handleLowLevelError(Throwable $throwable)
{
if (

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected 0 spaces after opening bracket; newline found

@WyriHaximus WyriHaximus merged commit ebd3a03 into master May 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants