fixed init errors

This commit is contained in:
ston1th 2021-03-07 13:48:30 +01:00
commit 7c7b816813
8 changed files with 29 additions and 18 deletions

View file

@ -121,7 +121,6 @@ func (s *Server) UpdateDB(db *db.DB) error {
}
func (s *Server) start() {
<-s.init
s.srv = &http.Server{
Handler: s.mux,
TLSConfig: s.tlsConfig,
@ -129,6 +128,7 @@ func (s *Server) start() {
WriteTimeout: 10 * time.Second,
}
go func() {
<-s.init
err := s.srv.Serve(s.listen)
if err != nil {
s.log.Error(err, "")