embedded-websocket icon indicating copy to clipboard operation
embedded-websocket copied to clipboard

ping frames misclassified as text on rare occassions

Open kskalski opened this issue 1 year ago • 2 comments

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).

kskalski avatar Oct 18 '24 02:10 kskalski

Confirmed (over a couple days running, which would normally trigger error) that this fix eliminates the issue I was seeing.

kskalski avatar Oct 21 '24 01:10 kskalski

Hi Kamil, thanks for reporting this and proposing a fix. I'm looking into it now.

ninjasource avatar Oct 25 '24 18:10 ninjasource

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.

kskalski avatar Nov 03 '24 01:11 kskalski

@ninjasource would you have a moment to look at the PR and release a new crate version?

kskalski avatar Dec 09 '24 05:12 kskalski

Thanks for your PR, much appreciated. I have published a new version on crates.io

ninjasource avatar Dec 10 '24 15:12 ninjasource