File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
util/src/main/java/io/kubernetes/client/util Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -111,12 +111,6 @@ public Throwable getError() {
111111 @ Override
112112 public synchronized void close () {
113113 if (state != State .CLOSED ) {
114- state = State .CLOSED ;
115- if (null != socket ) {
116- // code 1000 means "Normal Closure"
117- socket .close (1000 , "Triggered client-side terminate" );
118- log .debug ("Successfully closed socket." );
119- }
120114 // Close all output streams. Caller of getInputStream(int) is responsible
121115 // for closing returned input streams
122116 for (PipedOutputStream out : pipedOutput .values ()) {
@@ -143,6 +137,13 @@ public synchronized void close() {
143137 log .error ("Error on close" , ex );
144138 }
145139 }
140+
141+ state = State .CLOSED ;
142+ if (null != socket ) {
143+ // code 1000 means "Normal Closure"
144+ socket .close (1000 , "Triggered client-side terminate" );
145+ log .debug ("Successfully closed socket." );
146+ }
146147 }
147148 notifyAll ();
148149 }
You can’t perform that action at this time.
0 commit comments