YARN-6294. ATS client should better handle Socket closed case. Contributed by Li Lu.

This commit is contained in:
Junping Du 2017-03-15 11:49:51 -07:00
parent c0e061b410
commit 8b31ff6dba
1 changed files with 3 additions and 1 deletions

View File

@ -24,6 +24,7 @@
import java.net.ConnectException;
import java.net.HttpURLConnection;
import java.net.InetSocketAddress;
import java.net.SocketException;
import java.net.SocketTimeoutException;
import java.net.URI;
import java.net.URL;
@ -243,7 +244,8 @@ public boolean shouldRetryOn(Exception e) {
// Only retry on connection exceptions
return (e instanceof ClientHandlerException)
&& (e.getCause() instanceof ConnectException ||
e.getCause() instanceof SocketTimeoutException);
e.getCause() instanceof SocketTimeoutException ||
e.getCause() instanceof SocketException);
}
};
try {