Skip to content

Commit

Permalink
Fix compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaseizinger committed Sep 6, 2023
1 parent 5845556 commit 09055f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions transports/webrtc-websys/src/stream/poll_data_channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ impl AsyncWrite for PollDataChannel {

futures::ready!(this.poll_open(cx))?;

debug_assert!(this.buffered_amount() <= MAX_BUFFER);
let remaining_space = MAX_BUFFER - this.buffered_amount();
debug_assert!(this.buffered_amount() <= MAX_MSG_LEN);
let remaining_space = MAX_MSG_LEN - this.buffered_amount();

if remaining_space == 0 {
this.write_waker.register(cx.waker());
Expand Down

0 comments on commit 09055f4

Please sign in to comment.