You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change cause a race condition, where nextRequest tries to reuse the previous channel while it has been offered to the pool and is eventually used by someone else.
The text was updated successfully, but these errors were encountered:
Actually, @taer was right about a new Socket being created in the sense that nextRequest is performed immediately, before the original channel is drained and offered to the pull.
@jfarcand WDYT? Does it make sense to change the callback in this case so that it doesn't offer to the pool once drain is done, but perform the next request?
Actually, we're not opening more sockets that we should as long as connection pooling is allowed, which should generally be the case. Let's leave it like this for now.
PR #420 introduced a race condition on channel usage.
The author of this PR claimed that a new socket was open on 401, but this is not the case:
So the client doesn't necessarily open a new socket. It only does so if some other request got the connection from the pool before the next request is indeed performed: https://github.com/AsyncHttpClient/async-http-client/blob/ahc-1.7.x/src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java#L1355
This change cause a race condition, where nextRequest tries to reuse the previous channel while it has been offered to the pool and is eventually used by someone else.
The text was updated successfully, but these errors were encountered: