File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
util/src/main/java/io/kubernetes/client/informer/cache Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -223,10 +223,15 @@ private void watchHandler(Watchable<ApiType> watch) {
223
223
continue ;
224
224
}
225
225
if (eventType .get () == EventType .ERROR ) {
226
- String errorMessage =
227
- String .format ("got ERROR event and its status: %s" , item .status .toString ());
228
- log .error (errorMessage );
229
- throw new RuntimeException (errorMessage );
226
+ if (item .status != null && item .status .getCode () == HttpURLConnection .HTTP_GONE ) {
227
+ log .info ("Watch connection expired: {}" , item .status .getMessage ());
228
+ return ;
229
+ } else {
230
+ String errorMessage =
231
+ String .format ("got ERROR event and its status: %s" , item .status .toString ());
232
+ log .error (errorMessage );
233
+ throw new RuntimeException (errorMessage );
234
+ }
230
235
}
231
236
232
237
ApiType obj = item .object ;
You can’t perform that action at this time.
0 commit comments