Skip to content

Commit c31ec61

Browse files
committed
Properly close supervisor status service connections
1 parent a1059c8 commit c31ec61

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

components/local-app/pkg/bastion/bastion.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,9 @@ func (b *Bastion) tunnelPorts(ws *Workspace) {
760760
}
761761

762762
func (b *Bastion) doTunnelPorts(ctx context.Context, ws *Workspace) error {
763+
ctx, cancel := context.WithCancel(ctx)
764+
defer cancel()
765+
763766
statusService := supervisor.NewStatusServiceClient(ws.supervisorClient)
764767
status, err := statusService.PortsStatus(ctx, &supervisor.PortsStatusRequest{
765768
Observe: true,

0 commit comments

Comments
 (0)