digitalocean / digitalocean/go-libvirt
Deadlock if Stream Shutdown races with Push
Open
- Dominant language
- Go
- Stars
- 1.1k
- Forks
- 143
- PR merge metrics
- No merged PRs in 30d
Description
There's a deadlock scenario if the stream is being shutdown while still receiving events, which can occur if using LifecycleEvents and cancelling the context.
Example reproduction case
```
func TestStreamShutdown(t *testing.T) {
s := NewStream(1, 2)
events := testEvents(1)
s.Shutdown()
s.Push(events[0])
}
```
Contributor guide
Assessment
This issue has not been assessed yet.