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
Wouldn't this mean that an error-response with a body larger than 4096 bytes would fail to be drained completely and thus would leave behind an unusable connection?
Thank you for helping me understand this particular decision.
The text was updated successfully, but these errors were encountered:
@Richtermeister Yes, however consider a situation that the response body is 1GB - in this case you would prefer to pay the penalty of creating a new connection, over reading so much data over the network, just to discard it as soon as you get it.
Hey @Richtermeister , thanks for opening this, and sorry for our delay in response! @dmarkhas gave a perfect answer already. We want to reuse connections wherever possible, but if it means reading a large amount of data then the gains become losses.
Hi there, fantastic library! I just have a question. Why is the draining of response bodies limited to 4096 bytes? https://github.com/hashicorp/go-retryablehttp/blob/master/client.go#L60
Wouldn't this mean that an error-response with a body larger than 4096 bytes would fail to be drained completely and thus would leave behind an unusable connection?
Thank you for helping me understand this particular decision.
The text was updated successfully, but these errors were encountered: