more error logging

This commit is contained in:
Holger Cremer
2018-01-05 21:04:10 +01:00
parent 2f1025f681
commit af649daea2

View File

@@ -42,10 +42,14 @@ func StartWebService(conf conf.ServerConf, _devices *mqtt.DeviceData, _macDb db.
})
addr := fmt.Sprintf("%s:%d", conf.Host, conf.Port)
var err error
if conf.Https {
router.RunTLS(addr, conf.CertFile, conf.KeyFile)
err = router.RunTLS(addr, conf.CertFile, conf.KeyFile)
} else {
router.Run(addr)
err = router.Run(addr)
}
if err != nil {
logger.Error("gin exit", err)
}
}