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
AFAIK it is not a big deal, because in most cases original RoundTrip closes the request body, but I think there could rare cases with bad connection, when this is not happened and this can lead to a memory leak.
This is saying that if the logger is not nil, then the body will not be closed.
My understanding is that the roundtripper should ensure that the body is closed (I could be wrong about this). If we add this conditional, does it actually increase the chances that the body isn't closed?
If we're not sure, maybe it's best to stick with the devil we know?
Currently the request body is closed even, when the logger is not defined:
utils/client/client.go
Lines 149 to 153 in f6de111
It should be closed only when the logger is defined, e.g.:
AFAIK it is not a big deal, because in most cases original
RoundTrip
closes the request body, but I think there could rare cases with bad connection, when this is not happened and this can lead to a memory leak.@jtopjian objections, anything to add?
The text was updated successfully, but these errors were encountered: