Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ws 发送消息会出现消息丢失 #627

Open
thep0y opened this issue Jan 11, 2024 · 0 comments
Open

ws 发送消息会出现消息丢失 #627

thep0y opened this issue Jan 11, 2024 · 0 comments

Comments

@thep0y
Copy link

thep0y commented Jan 11, 2024

Describe the bug

具体表现为:

          debug!("发送消息: {:?}", msg);

          let result = ws.send(Message::text(msg)).await;
                if let Err(e) = result {
                    error!("发送消息出错: {}", e);
                    return;
                }
          }

debug日志能够所有消息,ws.send结果也是Ok,但客户端会丢失部分消息。

日志:
截屏2024-01-11 23 33 23

客户端接收到的消息:

截屏2024-01-11 23 34 05
@thep0y thep0y changed the title ws 发送消息偶发最后一条数消息丢失 ws 发送消息会出现消息丢失 Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant