embedded-websocket
embedded-websocket copied to clipboard
ping frames misclassified as text on rare occassions
I'm experiencing an issue when ping frame payload is reported as Text opcode WebSocketFrame.
I looked into the code and I have an impression that this line https://github.com/ninjasource/embedded-websocket/blob/85bfbdb5362ff3e81a21048628028b3c80619ee7/src/lib.rs#L729 should set both continuation fiels to none:
self.continuation_read = None;
self.continuation_frame_op_code = None;
I'm verifying if this change fixes my problem (takes some time to wait for error to happen... or not happen).
Confirmed (over a couple days running, which would normally trigger error) that this fix eliminates the issue I was seeing.
Hi Kamil, thanks for reporting this and proposing a fix. I'm looking into it now.
Any concerns with the PR? It would be nice to merge and release the fix, as this errors pops up a couple times / hour in my pipeline.
@ninjasource would you have a moment to look at the PR and release a new crate version?
Thanks for your PR, much appreciated. I have published a new version on crates.io