Skip to content

Commit 8fd687a

Browse files
author
Bashar Eid
committed
use StoppableWorkers in the rest of RecvOffer()
1 parent fcf72dd commit 8fd687a

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

rpc/wrtc_call_queue_mongodb.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,9 +1256,7 @@ func (queue *mongoDBWebRTCCallQueue) RecvOffer(ctx context.Context, hosts []stri
12561256
// and trying to connect to each other
12571257
// as both are doing trickle ice and generating new candidates with SDPs that are being updated in the
12581258
// table we try each of them as they come in to make a match
1259-
queue.activeBackgroundWorkers.Add(1)
1260-
utils.PanicCapturingGo(func() {
1261-
defer queue.activeBackgroundWorkers.Done()
1259+
queue.activeStoppableWorkers.Add(func(ctx context.Context) {
12621260
defer callerDoneCancel()
12631261
defer cleanup()
12641262

0 commit comments

Comments
 (0)