1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-24 06:28:42 +01:00

fix: improves memory leak in new container stream (#3076)

This commit is contained in:
Amir Raminfar
2024-07-09 08:14:28 -07:00
committed by GitHub
parent 00f2c4f2ef
commit ce2b008098
7 changed files with 42 additions and 26 deletions

View File

@@ -174,6 +174,10 @@ func (m *MultiHostService) SubscribeContainersStarted(ctx context.Context, conta
for _, client := range m.clients {
client.SubscribeContainersStarted(ctx, newContainers)
}
go func() {
<-ctx.Done()
close(newContainers)
}()
go func() {
for container := range newContainers {