serve restic: Print actual listener address

This commit is contained in:
Matt Holt
2018-04-04 07:56:26 -06:00
committed by Nick Craig-Wood
parent 5b8977a053
commit e13f65b953
5 changed files with 80 additions and 15 deletions

View File

@@ -58,8 +58,12 @@ func newServer(opt *Options) *server {
// serve runs the http server - doesn't return
func (s *server) serve() {
err := s.srv.Serve()
if err != nil {
fs.Errorf(nil, "Opening listener: %v", err)
}
fs.Logf(nil, "Serving remote control on %s", s.srv.URL())
s.srv.Serve()
s.srv.Wait()
}
// handler reads incoming requests and dispatches them