Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@

import static io.fabric8.kubernetes.client.utils.Utils.isNotNullOrEmpty;
import static java.net.HttpURLConnection.HTTP_GONE;
import static java.net.HttpURLConnection.HTTP_OK;

public class WatchConnectionManager<T extends HasMetadata, L extends KubernetesResourceList<T>> implements Watch {

Expand Down Expand Up @@ -193,6 +194,13 @@ public void onFailure(IOException e, Response response) {
return;
}

if (response != null && response.code() == HTTP_OK) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would group this block with the rest of the if then else that take place when response != null.

Definitely not a blocker though!

queue.add(new KubernetesClientException("Received 200 on WebSocket connection",
response.code(), null));
response.body().close();
return;
}

if (response != null) {
// We only need to queue startup failures.
Status status = OperationSupport.createStatus(response);
Expand Down