Skip to content

Commit

Permalink
Fixed missing acme config during tls server creation #214
Browse files Browse the repository at this point in the history
  • Loading branch information
illarion committed Apr 9, 2019
1 parent 7df9748 commit 3b22d78
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions server/tcp/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,6 @@ func New(name string, cfg config.Server) (*Server, error) {
return nil, err
}

server.tlsConfig, err = tlsutil.MakeTlsConfig(cfg.Tls, server.GetCertificate)
if err != nil {
return nil, err
}

log.Info("Creating '", name, "': ", cfg.Bind, " ", cfg.Balance, " ", cfg.Discovery.Kind, " ", cfg.Healthcheck.Kind)

return server, nil
Expand All @@ -140,6 +135,12 @@ func (this *Server) Cfg() config.Server {
*/
func (this *Server) Start() error {

var err error
this.tlsConfig, err = tlsutil.MakeTlsConfig(this.cfg.Tls, this.GetCertificate)
if err != nil {
return err
}

go func() {

for {
Expand Down

0 comments on commit 3b22d78

Please sign in to comment.