When proxying remote appliances (and even ChannelArchivers), if KeepAlive is enabled on the server, then the JDK URLConnection does not close the connection. This keeps the socket in CLOSE_WAIT state till GC kicks in.
We really have no need to keep the connection open and should try as hard as possible to relinquish the socket.
Checked on fixes. Use Apache commons when possible and add a Connection:close to close the connection. Tested by proxying retrieval from the photon archiver.
When proxying remote appliances (and even ChannelArchivers), if KeepAlive is enabled on the server, then the JDK URLConnection does not close the connection. This keeps the socket in CLOSE_WAIT state till GC kicks in.
We really have no need to keep the connection open and should try as hard as possible to relinquish the socket.