fix(jitsi): avoid closing session on connect failure

This commit is contained in:
zarazaex69
2026-05-15 16:55:25 +03:00
parent e86604276d
commit 714d2f9f48

View File

@@ -227,8 +227,6 @@ func (s *Session) Connect(ctx context.Context) error {
err := jSess.OpenBridge(bctx)
bcancel()
if err != nil {
_ = jSess.Close()
s.jSess.Store(nil)
return fmt.Errorf("open bridge: %w", err)
}
s.bridgeReady.Store(true)
@@ -237,9 +235,6 @@ func (s *Session) Connect(ctx context.Context) error {
if s.shouldNegotiatePC() {
if err := s.negotiatePC(ctx, jSess); err != nil {
_ = jSess.Close()
s.jSess.Store(nil)
s.bridgeReady.Store(false)
return err
}
}