mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2024-06-15 20:25:12 +02:00
Unregister / remove subscriber if reconnection didn't work.
Partial fix from #15.
This commit is contained in:
parent
beb84b9cad
commit
0dcb9f6b2d
|
@ -1078,6 +1078,10 @@ retry:
|
|||
var roomId uint64
|
||||
handle, roomId, err = p.mcu.getOrCreateSubscriberHandle(ctx, p.publisher, p.streamType)
|
||||
if err != nil {
|
||||
// Reconnection didn't work, need to unregister/remove subscriber
|
||||
// so a new object will be created if the request is retried.
|
||||
p.mcu.unregisterClient(p)
|
||||
p.listener.SubscriberClosed(p)
|
||||
callback(fmt.Errorf("Already connected as subscriber for %s, error during re-joining: %s", p.streamType, err), nil)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue