1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-11-24 08:02:32 +02:00

Add nil check for acme provider

This commit is contained in:
Asim Aslam 2019-10-11 16:52:57 +01:00
parent a4f0dd8939
commit dd7677e6cc

View File

@ -52,7 +52,7 @@ func (s *httpServer) Start() error {
var l net.Listener
var err error
if s.opts.EnableACME {
if s.opts.EnableACME && s.opts.ACMEProvider != nil {
// should we check the address to make sure its using :443?
l, err = s.opts.ACMEProvider.NewListener(s.opts.ACMEHosts...)
} else if s.opts.EnableTLS && s.opts.TLSConfig != nil {