File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
src/main/java/com/treasuredata/client Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 2424import java .text .SimpleDateFormat ;
2525import java .util .Date ;
2626import java .util .Map ;
27+ import java .util .Objects ;
2728import java .util .Optional ;
2829import java .util .concurrent .TimeUnit ;
2930import java .util .concurrent .TimeoutException ;
@@ -181,6 +182,10 @@ else if (e instanceof SocketException) {
181182 // All known SocketException are retryable.
182183 return new TDClientSocketException (socketException );
183184 }
185+ else if (Objects .equals (socketException .getMessage (), "Socket closed" )) {
186+ // okhttp can raise java.net.SocketException("Socket closed")
187+ return new TDClientSocketException (socketException );
188+ }
184189 else {
185190 // Other unknown SocketException are considered non-retryable.
186191 throw new TDClientSocketException (socketException );
You can’t perform that action at this time.
0 commit comments