Javadoc
Set the maximum time in milliseconds that we'll allow a connection to stay idle to a host. A negative
value indicates indefinitely.
This setting is useful if you you need to work around a firewall that forcefully closes connections
after a fixed amount of idle time. Example: if your firewall cuts connections after an idle time
of 30 mn, one could set this property with the duration 29 mn 30s to have a margin.
But before using setMaxLastSuccessTimeMillis
, the first way, that is, the most used way,
to try to work around a firewall problem should be to use the socket "keepalive" mechanism, see
setUseSocketKeepalive
method. The current method setMaxLastSuccessTimeMillis
is generally used for dealing with firewalls when the "keepalive" mechanism could not be used.