fix 启动server完成之后 1秒钟内启动client报错

fix 启动server完成之后 1秒钟内启动client报错
This commit is contained in:
JohnSimith 2023-07-24 08:59:31 +08:00
parent ba32ec4305
commit 4db8c14471

View File

@ -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();