Skip to content

Commit

Permalink
fix fabric8io#3384: addressing that in can be null
Browse files Browse the repository at this point in the history
  • Loading branch information
shawkins authored and manusa committed Sep 21, 2021
1 parent 2f362ed commit cfb9e3a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#### Bugs
* Fix #3445: TokenRefreshInterceptor throws when running incluster config
* Fix #3456: io.fabric8:crd-generator README should reference crd-generator-apt instead of now removed crd-generator artifact
* Fix #3384: preventing NPE from being logged with pod execs.

#### Improvements
* Fix #3398: Added javadocs explaining the wait parameter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,11 @@ public void onOpen(WebSocket webSocket, Response response) {
}

webSocketRef.set(webSocket);
if (!executorService.isShutdown()) {
if (in != null && !executorService.isShutdown()) {
// the task will be cancelled via shutdownNow
InputStreamPumper.pump(InputStreamPumper.asInterruptible(in), this::send, executorService);
startedFuture.complete(null);
}
startedFuture.complete(null);
} catch (IOException e) {
startedFuture.completeExceptionally(new KubernetesClientException(OperationSupport.createStatus(response)));
} finally {
Expand Down Expand Up @@ -268,22 +268,27 @@ public void onClosed(WebSocket webSocket, int code, String reason) {
}
}

@Override
public OutputStream getInput() {
return input;
}

@Override
public InputStream getOutput() {
return output;
}

@Override
public InputStream getError() {
return error;
}

@Override
public InputStream getErrorChannel() {
return errorChannel;
}

@Override
public void resize(int cols, int rows) {
if (cols < 0 || rows < 0) {
return;
Expand Down

0 comments on commit cfb9e3a

Please sign in to comment.