ninjasource / embedded-websocket

A rust websocket library for embedded systems (no_std)
Apache License 2.0
98 stars 28 forks source link

ping frames misclassified as text on rare occassions #21

Open kskalski opened 3 days ago

kskalski commented 3 days ago

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 commented 23 hours ago

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