File tree 2 files changed +14
-5
lines changed
core/src/main/java/jenkins/agents
2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 44
44
import java .util .Collections ;
45
45
import java .util .HashMap ;
46
46
import java .util .Map ;
47
+ import java .util .concurrent .TimeUnit ;
47
48
import java .util .logging .Level ;
48
49
import java .util .logging .Logger ;
49
50
import jenkins .slaves .JnlpAgentReceiver ;
@@ -166,11 +167,19 @@ protected void error(Throwable cause) {
166
167
167
168
class Transport extends AbstractByteBufferCommandTransport {
168
169
170
+ Transport () {
171
+ super (true );
172
+ }
173
+
169
174
@ Override
170
- protected void write (ByteBuffer header , ByteBuffer data ) throws IOException {
171
- LOGGER .finest (() -> "sending message of length " + ChunkHeader .length (ChunkHeader .peek (header )));
172
- sendBinary (header , false );
173
- sendBinary (data , true );
175
+ protected void write (ByteBuffer headerAndData ) throws IOException {
176
+ // As in Engine.runWebSocket:
177
+ LOGGER .finest (() -> "sending message of length " + (headerAndData .remaining () - ChunkHeader .SIZE ));
178
+ try {
179
+ sendBinary (headerAndData ).get (5 , TimeUnit .MINUTES );
180
+ } catch (Exception x ) {
181
+ throw new IOException (x );
182
+ }
174
183
}
175
184
176
185
@ Override
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ THE SOFTWARE.
87
87
<changelog .url>https://www.jenkins.io/changelog</changelog .url>
88
88
89
89
<!-- Bundled Remoting version -->
90
- <remoting .version>3085.vc4c6977c075a </remoting .version>
90
+ <remoting .version>3107.v665000b_51092 </remoting .version>
91
91
<!-- Minimum Remoting version, which is tested for API compatibility -->
92
92
<remoting .minimum.supported.version>4.7</remoting .minimum.supported.version>
93
93
You can’t perform that action at this time.
0 commit comments