ok2c commented on code in PR #408:
URL:
https://github.com/apache/httpcomponents-core/pull/408#discussion_r1214013070
##########
httpcore5/src/main/java/org/apache/hc/core5/reactor/AbstractIOSessionPool.java:
##########
@@ -183,7 +183,20 @@ private void getSessionInternal(
} else {
poolEntry.requestQueue.add(callback);
if (poolEntry.sessionFuture != null &&
poolEntry.sessionFuture.isDone()) {
- poolEntry.sessionFuture = null;
+ // Check whether we should recreate a new conn or not
+ try {
+ poolEntry.session = poolEntry.sessionFuture.get();
Review Comment:
@gaojieliu This is wrong. One _MUST NOT_ use a blocking call inside a
callback that can be executed by an I/O reactor thread.
There has to be a better way.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]