Skip to content

Commit

Permalink
clean always pid file on error
Browse files Browse the repository at this point in the history
  • Loading branch information
gmgigi96 committed Jun 28, 2023
1 parent 5ae5c4d commit 4c54f09
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/revad/runtime/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,14 @@ func New(config *config.Config, opt ...Option) (*Reva, error) {

listeners, err := watcher.GetListeners(servicesAddresses(config))
if err != nil {
watcher.Clean()
return nil, err
}

setRandomAddresses(config, listeners, log)

if err := applyTemplates(config); err != nil {
watcher.Clean()
return nil, err
}
initSharedConf(config)
Expand All @@ -97,11 +99,13 @@ func New(config *config.Config, opt ...Option) (*Reva, error) {
http := groupHTTPByAddress(config)
servers, err := newServers(grpc, http, listeners, log)
if err != nil {
watcher.Clean()
return nil, err
}

serverless, err := newServerless(config, log)
if err != nil {
watcher.Clean()
return nil, err
}

Expand Down

0 comments on commit 4c54f09

Please sign in to comment.