Browse Source

loopd/daemon: handle proxy error

Check returned error to make linter happy.
pull/115/head
Johan T. Halseth 1 year ago
parent
commit
391ae9dc6b
No known key found for this signature in database GPG Key ID: 15BAADA29DA20D26
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      loopd/daemon.go

+ 9
- 1
loopd/daemon.go View File

@ -103,7 +103,15 @@ func daemon(config *config) error {
}
defer restListener.Close()
proxy := &http.Server{Handler: mux}
go proxy.Serve(restListener)
go func() {
err := proxy.Serve(restListener)
// ErrServerClosed is always returned when the proxy is shut
// down, so don't log it.
if err != nil && err != http.ErrServerClosed {
log.Error(err)
}
}()
statusChan := make(chan loop.SwapInfo)

Loading…
Cancel
Save