Skip to content

Commit 728722b

Browse files
authored
Initialize transport at the beginning of opened (#11039)
1 parent 6dceb7b commit 728722b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/java/jenkins/agents/WebSocketAgents.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,10 @@ private static class Session extends WebSocketSession {
137137
@SuppressFBWarnings(value = "RV_RETURN_VALUE_IGNORED_BAD_PRACTICE", justification = "method signature does not permit plumbing through the return value")
138138
@Override
139139
protected void opened() {
140+
transport = new Transport();
140141
Computer.threadPoolForRemoting.submit(() -> {
141142
LOGGER.fine(() -> "setting up channel for " + agent);
142143
state.fireBeforeChannel(new ChannelBuilder(agent, Computer.threadPoolForRemoting));
143-
transport = new Transport();
144144
try {
145145
state.fireAfterChannel(state.getChannelBuilder().build(transport));
146146
LOGGER.fine(() -> "set up channel for " + agent);

0 commit comments

Comments
 (0)