mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2026-03-14 14:35:44 +01:00
Merge pull request #1152 from strukturag/fix-subscriber-close-on-error
Close subscriber synchronously on errors.
This commit is contained in:
commit
8ed1f15b95
1 changed files with 2 additions and 2 deletions
|
|
@ -236,7 +236,7 @@ retry:
|
|||
switch error_code {
|
||||
case JANUS_VIDEOROOM_ERROR_NO_SUCH_ROOM:
|
||||
p.logger.Printf("Publisher %s not created yet for %s, not joining room %d as subscriber", p.publisher, p.streamType, p.roomId)
|
||||
go p.Close(context.Background())
|
||||
p.Close(context.Background())
|
||||
callback(fmt.Errorf("Publisher %s not created yet for %s", p.publisher, p.streamType), nil)
|
||||
return
|
||||
case JANUS_VIDEOROOM_ERROR_NO_SUCH_FEED:
|
||||
|
|
@ -249,7 +249,7 @@ retry:
|
|||
}
|
||||
|
||||
if err := waiter.Wait(ctx); err != nil {
|
||||
go p.Close(context.Background())
|
||||
p.Close(context.Background())
|
||||
callback(err, nil)
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue