digitalocean / digitalocean/go-libvirt

Deadlock if Stream Shutdown races with Push

Open
#191 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.