ratel
ratel copied to clipboard
client连接server的时候特别慢
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呢?
加点sleep,才有优化空间呐(bushi