1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

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

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