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:48:09 -07:00
parent bb6a214cd3
commit 221783b35b
1 changed files with 3 additions and 1 deletions

View File

@ -22,6 +22,7 @@ import java.io.IOException;
import java.lang.reflect.UndeclaredThrowableException;
import java.net.ConnectException;
import java.net.HttpURLConnection;
import java.net.SocketException;
import java.net.SocketTimeoutException;
import java.net.URI;
import java.net.URL;
@ -390,7 +391,8 @@ public class TimelineConnector extends AbstractService {
// 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 {