mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-24 18:04:54 +08:00
fix 启动server完成之后 1秒钟内启动client报错
fix 启动server完成之后 1秒钟内启动client报错
This commit is contained in:
parent
ba32ec4305
commit
4db8c14471
@ -19,6 +19,12 @@ public class AioClientTest {
|
||||
Console.log("OK");
|
||||
}
|
||||
});
|
||||
//线程休息1秒,然后client 和 server 初始化完再连接
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
client.write(ByteBuffer.wrap("Hello".getBytes()));
|
||||
client.read();
|
||||
|
Loading…
Reference in New Issue
Block a user