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

client连接server的时候特别慢 #96

Open
hlz5857475 opened this issue Aug 2, 2022 · 1 comment
Open

client连接server的时候特别慢 #96

hlz5857475 opened this issue Aug 2, 2022 · 1 comment

Comments

@hlz5857475
Copy link

WebsocketTransferHandler中new Thread(() -> {
try {
Thread.sleep(2000L);
ChannelUtils.pushToClient(ch, ClientEventCode.CODE_CLIENT_CONNECT, String.valueOf(clientSide.getId()));
ChannelUtils.pushToClient(ch, ClientEventCode.CODE_CLIENT_NICKNAME_SET, null);
} catch (InterruptedException ignored) {
}
}).start();
为什么要sleep 2s呢?

@ainilili
Copy link
Owner

ainilili commented Aug 2, 2022 via email

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

2 participants