且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在风暴螺栓中使用 Apache 的 AsyncHttpClient

更新时间:2023-01-04 18:01:10

您是否在回调可以执行之前关闭主流程中的客户端 (client.close();)?

Are you shutting down the client (client.close();) in your main flow before the callback can execute?

错误是说IO路径已经关闭.一般来说,异步客户端的实例应该被重新用于重复的请求,并且只有在所有"请求已经发出时才被销毁,例如在应用程序关闭时.

The error is saying that the IO path has already been closed. In general, instances of async clients should be re-used for repeated requests and destroyed only when "ALL" requests have been made, e.g. at application shutdown.