|
|
@ -34,12 +34,12 @@ func (srv *UIService) Addr() string { |
|
|
|
return srv.srv.Addr |
|
|
|
return srv.srv.Addr |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (srv *UIService) ListenAndServe() { |
|
|
|
func (srv *UIService) ListenAndServe() error { |
|
|
|
if !srv.inited { |
|
|
|
if !srv.inited { |
|
|
|
srv.init() |
|
|
|
srv.init() |
|
|
|
} |
|
|
|
} |
|
|
|
log.Printf("Listening on %v\n", srv.srv.Addr) |
|
|
|
log.Printf("Listening on %v\n", srv.srv.Addr) |
|
|
|
srv.srv.ListenAndServe() |
|
|
|
return srv.srv.ListenAndServe() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (srv *UIService) Shutdown(ctx context.Context) error { |
|
|
|
func (srv *UIService) Shutdown(ctx context.Context) error { |
|
|
|