fix(telemost): trigger reconnect only on failed state, not disconnected

This commit is contained in:
zarazaex69
2026-04-30 01:26:37 +03:00
parent 3064850f7c
commit fad1f605ea

View File

@@ -336,8 +336,7 @@ func (p *Peer) setupPeerConnections(config webrtc.Configuration) error {
}
func (p *Peer) onConnectionStateChange(state webrtc.PeerConnectionState) {
if !p.closed.Load() && (state == webrtc.PeerConnectionStateFailed ||
state == webrtc.PeerConnectionStateDisconnected) {
if !p.closed.Load() && state == webrtc.PeerConnectionStateFailed {
p.queueReconnect()
}
}