Exceptions, and how best to retry when a connection is reset?

前端 未结 3 1977
不知归路
不知归路 2021-02-08 23:43

I have some code which connects to a URL to download a file, and then performs some processing on it. However, sometimes I am receiving the error java.net.SocketException:

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-09 00:14

    This is the kind of thing that I'd rather let a bullet-proof connection pool handle for me rather than writing it myself.

提交回复
热议问题