api(portForward): ensure that rendezvousConn is closed

This commit is contained in:
Nikolay Edigaryev 2026-03-07 00:00:03 +01:00
parent b4ee888077
commit d96249cfbb
1 changed files with 3 additions and 0 deletions

View File

@ -89,6 +89,9 @@ func (controller *Controller) portForward(
return responder.Error(err)
}
defer func() {
_ = rendezvousConn.Close()
}()
// Worker will asynchronously start port forwarding, so we wait
wsConn, err := websocket.Accept(ctx.Writer, ctx.Request, &websocket.AcceptOptions{