Skip to content

Commit 1ea2d4b

Browse files
author
yanshay
committed
fix: support all frame types except 'reserved' to include payload (before fix not all could)
1 parent 869296c commit 1ea2d4b

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

edge-ws/src/lib.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,7 @@ impl FrameHeader {
193193

194194
let frame_header = FrameHeader {
195195
frame_type,
196-
payload_len: matches!(
197-
frame_type,
198-
FrameType::Binary(_) | FrameType::Text(_) | FrameType::Continue(_)
199-
)
200-
.then(|| payload_len)
201-
.unwrap_or(0),
196+
payload_len,
202197
mask_key,
203198
};
204199

0 commit comments

Comments
 (0)