osbuild-composer: socket always has two listeners
A third listener used to exist for the RCM API, but was removed a while ago.
This commit is contained in:
parent
6dce21cdc8
commit
af9471e4a2
1 changed files with 4 additions and 6 deletions
|
|
@ -121,14 +121,12 @@ func main() {
|
|||
log.Fatalf("Could not get listening sockets: " + err.Error())
|
||||
}
|
||||
|
||||
if _, exists := listeners["osbuild-composer.socket"]; !exists {
|
||||
composerListeners, exists := listeners["osbuild-composer.socket"]
|
||||
if !exists {
|
||||
log.Fatalf("osbuild-composer.socket doesn't exist")
|
||||
}
|
||||
|
||||
composerListeners := listeners["osbuild-composer.socket"]
|
||||
|
||||
if len(composerListeners) != 2 && len(composerListeners) != 3 {
|
||||
log.Fatalf("Unexpected number of listening sockets (%d), expected 2 or 3", len(composerListeners))
|
||||
if len(composerListeners) != 2 {
|
||||
log.Fatalf("Expected two listeners in osbuild-composer.socket, but found %d", len(composerListeners))
|
||||
}
|
||||
|
||||
weldrListener := composerListeners[0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue