Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not repeatly create Config in exec #1081

Merged
merged 1 commit into from
May 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
New Feature

Improvements

* Do not repeatly create Config instance in exec - https://github.com/fabric8io/kubernetes-client/pull/1081

#### 3.1.12
Bugs
* Fix #1070 : Error parsing openshift json template with the latest version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public ExecWatch exec(String... command) {
URL url = new URL(URLUtils.join(getResourceUrl().toString(), sb.toString()));
Request.Builder r = new Request.Builder().url(url).header("Sec-WebSocket-Protocol", "v4.channel.k8s.io").get();
OkHttpClient clone = client.newBuilder().readTimeout(0, TimeUnit.MILLISECONDS).build();
final ExecWebSocketListener execWebSocketListener = new ExecWebSocketListener(new Config(), in, out, err, errChannel, inPipe, outPipe, errPipe, errChannelPipe, execListener);
final ExecWebSocketListener execWebSocketListener = new ExecWebSocketListener(getConfig(), in, out, err, errChannel, inPipe, outPipe, errPipe, errChannelPipe, execListener);
clone.newWebSocket(r.build(), execWebSocketListener);
execWebSocketListener.waitUntilReady();
return execWebSocketListener;
Expand Down