Skip to content

Commit

Permalink
chore: improve ws poll loop
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWaWaR committed Nov 2, 2023
1 parent 93a7cfd commit 6fed349
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions akasa-core/src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,7 @@ impl<S: AsyncRead + AsyncWrite + Unpin> AsyncRead for WebSocketWrapper<S> {
Poll::Ready(Some(Ok(msg))) => match msg {
Message::Binary(bin) => {
if bin.is_empty() {
cx.waker().wake_by_ref();
return Poll::Pending;
continue;
}
*read_data = bin;
*read_data_idx = 0;
Expand Down

0 comments on commit 6fed349

Please sign in to comment.