Initialize `transport` at the beginning of `opened` (#11039)

This commit is contained in:
Guruprasad Bhat 2025-09-06 12:20:23 +05:30 committed by GitHub
parent 6dceb7b283
commit 728722b537
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -137,10 +137,10 @@ public final class WebSocketAgents extends InvisibleAction implements Unprotecte
@SuppressFBWarnings(value = "RV_RETURN_VALUE_IGNORED_BAD_PRACTICE", justification = "method signature does not permit plumbing through the return value") @SuppressFBWarnings(value = "RV_RETURN_VALUE_IGNORED_BAD_PRACTICE", justification = "method signature does not permit plumbing through the return value")
@Override @Override
protected void opened() { protected void opened() {
transport = new Transport();
Computer.threadPoolForRemoting.submit(() -> { Computer.threadPoolForRemoting.submit(() -> {
LOGGER.fine(() -> "setting up channel for " + agent); LOGGER.fine(() -> "setting up channel for " + agent);
state.fireBeforeChannel(new ChannelBuilder(agent, Computer.threadPoolForRemoting)); state.fireBeforeChannel(new ChannelBuilder(agent, Computer.threadPoolForRemoting));
transport = new Transport();
try { try {
state.fireAfterChannel(state.getChannelBuilder().build(transport)); state.fireAfterChannel(state.getChannelBuilder().build(transport));
LOGGER.fine(() -> "set up channel for " + agent); LOGGER.fine(() -> "set up channel for " + agent);