mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-21 21:33:18 +01:00
fix: tries to fix nil pointer when container for event is not there
This commit is contained in:
2
assets/typed-router.d.ts
vendored
2
assets/typed-router.d.ts
vendored
@@ -1,7 +1,7 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/* prettier-ignore */
|
/* prettier-ignore */
|
||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
// Generated by unplugin-vue-router. ‼️ DO NOT MODIFY THIS FILE ‼️
|
// Generated by unplugin-vue-router. \u203C\uFE0F DO NOT MODIFY THIS FILE \u203C\uFE0F
|
||||||
// It's recommended to commit this file.
|
// It's recommended to commit this file.
|
||||||
// Make sure to add this file to your tsconfig.json file as an "includes" or "files" entry.
|
// Make sure to add this file to your tsconfig.json file as an "includes" or "files" entry.
|
||||||
|
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ func (s *ContainerStore) FindContainer(id string, labels ContainerLabels) (Conta
|
|||||||
return &newContainer, false
|
return &newContainer, false
|
||||||
} else {
|
} else {
|
||||||
log.Error().Err(err).Msg("failed to fetch container")
|
log.Error().Err(err).Msg("failed to fetch container")
|
||||||
return c, false
|
return c, true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return c, false
|
return c, false
|
||||||
@@ -313,6 +313,9 @@ func (s *ContainerStore) init() {
|
|||||||
s.containers.Delete(event.ActorID)
|
s.containers.Delete(event.ActorID)
|
||||||
|
|
||||||
case "update":
|
case "update":
|
||||||
|
if event.Container == nil {
|
||||||
|
log.Error().Interface("event", event).Msg("container update event with nil container")
|
||||||
|
} else {
|
||||||
started := false
|
started := false
|
||||||
updatedContainer, _ := s.containers.Compute(event.ActorID, func(c *Container, loaded bool) (*Container, bool) {
|
updatedContainer, _ := s.containers.Compute(event.ActorID, func(c *Container, loaded bool) (*Container, bool) {
|
||||||
if loaded {
|
if loaded {
|
||||||
@@ -332,7 +335,6 @@ func (s *ContainerStore) init() {
|
|||||||
return c, true
|
return c, true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
if started {
|
if started {
|
||||||
s.subscribers.Range(func(ctx context.Context, events chan<- ContainerEvent) bool {
|
s.subscribers.Range(func(ctx context.Context, events chan<- ContainerEvent) bool {
|
||||||
select {
|
select {
|
||||||
@@ -347,6 +349,7 @@ func (s *ContainerStore) init() {
|
|||||||
return true
|
return true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
case "die":
|
case "die":
|
||||||
s.containers.Compute(event.ActorID, func(c *Container, loaded bool) (*Container, bool) {
|
s.containers.Compute(event.ActorID, func(c *Container, loaded bool) (*Container, bool) {
|
||||||
|
|||||||
Reference in New Issue
Block a user