Commit d2ef070
taylor.smock
Fix #22160: Retry on
This allows additional exceptions to force a retry. Specifically, the
following subclasses of `SocketException` were considered:
* `BindException` -- shouldn't be thrown, "Signals that an error occurred
while attempting to bind a socket to a local address and port. Typically,
the port is in use, or the requested local address could not be assigned."
This will be raised if it is ever encountered.
* `ConnectException`-- replacing that here, "Signals that an error occurred
while attempting to connect a socket to a remote address and port.
Typically, the connection was refused remotely (e.g., no process is
listening on the remote address/port)."
* `ConnectionResetException` -- "Thrown to indicate a connection reset"
This seems to be a Java internal class. It is rethrown.
* `NoRouteToHostException` -- "Signals that an error occurred while attempting
to connect a socket to a remote address and port. Typically, the remote
host cannot be reached because of an intervening firewall, or if an
intermediate router is down."
* `PortUnreachableException` -- "Signals that an ICMP Port Unreachable message
has been received on a connected datagram."
`SocketException` is only thrown in one location in the JDK source code, but
just in case someone decided to throw the exception in a library, we
additionally check that the message matches that from the JDK source. This is,
unfortunately, a bit more fragile than it should be.
git-svn-id: https://josm.openstreetmap.de/svn/trunk@18532 0c6e7542-c601-0410-84e7-c038aed88b3bSocketException: Unexpected end of file from server
1 parent c79ca72 commit d2ef070
1 file changed
+15
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
| |||
768 | 771 | | |
769 | 772 | | |
770 | 773 | | |
771 | | - | |
772 | | - | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
773 | 786 | | |
774 | 787 | | |
775 | 788 | | |
| |||
0 commit comments