You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: google-cloud-contrib/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageReadChannel.java
+11-8Lines changed: 11 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -108,7 +108,7 @@ public int read(ByteBuffer dst) throws IOException {
108
108
amt = channel.read(dst);
109
109
break;
110
110
} catch (StorageExceptionexs) {
111
-
if (reopens < maxChannelReopens && (isReopenable(exs) || isReopenable(exs.getCause()))) {
111
+
if (reopens < maxChannelReopens && isReopenable(exs)) {
112
112
// these errors aren't marked as retryable since the channel is closed;
113
113
// but here at this higher level we can retry them.
114
114
reopens++;
@@ -136,13 +136,16 @@ public int read(ByteBuffer dst) throws IOException {
136
136
}
137
137
138
138
privatestaticbooleanisReopenable(Throwableexs) {
139
-
while (exs != null) {
140
-
if (exs.getMessage().contains("Connection closed prematurely")
0 commit comments