grpc-js: Shutdown transport if a state change occurs while connecting

This commit is contained in:
Michael Lumish 2024-01-16 14:37:55 -08:00
parent 442e3ea24a
commit 2b31f8c148
1 changed files with 4 additions and 0 deletions

View File

@ -245,6 +245,10 @@ export class Subchannel {
);
}
});
} else {
/* If we can't transition from CONNECTING to READY here, we will
* not be using this transport, so release its resources. */
transport.shutdown();
}
},
error => {