Skip to content

Commit

Permalink
grpc-js: Shutdown transport if a state change occurs while connecting
Browse files Browse the repository at this point in the history
  • Loading branch information
murgatroid99 committed Jan 16, 2024
1 parent 442e3ea commit 2b31f8c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/grpc-js/src/subchannel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down

0 comments on commit 2b31f8c

Please sign in to comment.