Keep-Alive, and thus Session is your friend as mentioned by Mark.
Though, check the server HTTP response headers, if it is sending back Connection: close
it may ignore the client keep-alive regardless. In which case, catching the exception and retrying may be the best approach.