Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix reconnect on connection reset #4

Merged
merged 1 commit into from
Aug 26, 2020
Merged

Conversation

schwarz-b5c
Copy link
Contributor

@schwarz-b5c schwarz-b5c commented Aug 26, 2020

The current check for detecting whether a reconnect is necessary does not work correctly.

According to the official documentation fwrite() returns false when encountering an error. In order to detect whether the connection was reset we should therefore check for false and not 0.

I am aware that this package is deprecated, but it is still a dependency of gos/web-socket-bundle 2.x and 3.x. Without this fix this package and therefore gos/web-socket-bundle's Pusher doesn't work reliably

According to the official documentation `fwrite`() returns `false`
when encountering an error.  In order to detect whether the connection
was reset we should therefore check for `false` and not `0`.
@mbabker mbabker added the bug label Aug 26, 2020
@mbabker mbabker merged commit ab72a28 into GeniusesOfSymfony:1.x Aug 26, 2020
@mbabker
Copy link
Contributor

mbabker commented Aug 26, 2020

Thanks!

@mbabker
Copy link
Contributor

mbabker commented Aug 26, 2020

Tagged and released in 1.2.1

I am aware that this package is deprecated, but it is still a dependency of gos/web-socket-bundle 2.x and 3.x.

And that's why the package isn't completely abandoned. As long as those versions of the bundle are still supported I'll make sure that this package functions and take in bug fixes to keep it reliable, but new functionality or major updates aren't going to be added in at this point.

@schwarz-b5c
Copy link
Contributor Author

Thanks. Much appreciated.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants