Skip to content

Commit

Permalink
libpod: remove shutdown.Unregister()
Browse files Browse the repository at this point in the history
It is never used and needed so let's just remove some dead code.

Signed-off-by: Paul Holzinger <[email protected]>
  • Loading branch information
Luap99 committed Sep 26, 2024
1 parent 0bbef4b commit 5de7b7c
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions libpod/shutdown/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,29 +140,3 @@ func Register(name string, handler func(os.Signal) error) error {

return nil
}

// Unregister un-registers a given shutdown handler.
func Unregister(name string) error {
handlerLock.Lock()
defer handlerLock.Unlock()

if handlers == nil {
return nil
}

if _, ok := handlers[name]; !ok {
return nil
}

delete(handlers, name)

newOrder := []string{}
for _, checkName := range handlerOrder {
if checkName != name {
newOrder = append(newOrder, checkName)
}
}
handlerOrder = newOrder

return nil
}

0 comments on commit 5de7b7c

Please sign in to comment.