-
Notifications
You must be signed in to change notification settings - Fork 255
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
Client Ping/Pong broken in 1.6 #170
Comments
Did some checks, and the autoresponder do reply as expected on empty message. The issue you have is probably related to masking. This has been wrong all along, but it appears my attempt to improve things in As a side note, the quick fix you mention means the client do not send a pong when receiving ping at all. The |
I did a rewrite of masking policy that (hopefully) will solve the issue you're experiencing; #171 However, the servers I'm testing with work with Thanks in advance! |
@MarcusOhman91 |
The PR was closed and not merged, why? |
delayed response, but can confirm that this worked. I guess this issue should be left open if any of the remaining maintainers decides to fix it in this repo |
Pong request payload does not match ping response payload (which causes the websocket server I try to interact with to close the connection)
In my scenario the ping from the websocket server is an empty string. When producing the pong response, the pushFrame is invoked receiving the following $frame argument:
[true,"","pong",false]
. This in turn produces a $data of�\u0000"
which is written to the stream.I could quickfix it for my scenario by changing this line
$this->write($data);
to
$this->write($opcode === 'pong' ? '' : $data);
But I instead solved it by downgrading to v1.5.8 where the ping/pong interaction seems to work fine.
Reproduced with PHP 8.1.12 (cli)
version 1.6.3
The text was updated successfully, but these errors were encountered: