mirror of
https://github.com/openlibrecommunity/olcrtc.git
synced 2026-06-05 03:49:44 +00:00
fix(jitsi): avoid closing session on connect failure
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user