Hold external chat admission until live turn recovery completes
This commit is contained in:
@@ -498,11 +498,14 @@ func HandlerWithOptions(ctx context.Context, options Options, stores ...*pipelin
|
||||
// whose turn is still running, so a reply or question still notifies
|
||||
// with no client attached.
|
||||
done := make(chan struct{})
|
||||
ready := make(chan struct{})
|
||||
hub.recoveryDone = done
|
||||
hub.recoveryReady = ready
|
||||
go func() {
|
||||
hub.reattachSessions(ctx, options.Chat)
|
||||
// Restore live turn ownership before queue rooms can start runners.
|
||||
hub.resumeQueued(ctx, options.Chat)
|
||||
close(ready)
|
||||
hub.observeRunningTurns(ctx, options.Chat)
|
||||
close(done)
|
||||
hub.retryReattachments(ctx, options.Chat)
|
||||
|
||||
Reference in New Issue
Block a user