mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2026-03-14 14:35:44 +01:00
Close subscriber synchronously on errors.
Otherwise it could happen that a re-subscribe request was still processed by the (closing) old subscriber for which the deferred processing stopped. Such requests would then timeout. Could be triggered by the CI tests under load (e.g. Test_JanusSubscriberTimeout).
This commit is contained in:
parent
d5edd53536
commit
8371fbe9bf
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