We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
(*logFollower).follow
1 parent aa9dbf2 commit 4068f70Copy full SHA for 4068f70
coderd/provisionerjobs.go
@@ -318,6 +318,10 @@ func (f *logFollower) follow() {
318
return
319
}
320
defer subCancel()
321
+ // Move cancel up the stack so it happens before unsubscribing,
322
+ // otherwise we can end up in a deadlock due to how the
323
+ // in-memory pubsub does mutex locking on send/unsubscribe.
324
+ defer cancel()
325
326
// we were provided `complete` prior to starting this subscription, so
327
// we also need to check whether the job is now complete, in case the
0 commit comments