Merge pull request #3222 from JohnSimith/v6-dev

fix 启动server完成之后 1秒钟内启动client报错
This commit is contained in:
Golden Looly
2023-07-26 19:03:57 +08:00
committed by GitHub

View File

@@ -19,6 +19,12 @@ public class AioClientTest {
Console.log("OK"); Console.log("OK");
} }
}); });
//线程休息1秒然后client 和 server 初始化完再连接
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
client.write(ByteBuffer.wrap("Hello".getBytes())); client.write(ByteBuffer.wrap("Hello".getBytes()));
client.read(); client.read();