From 5402c753fb2ad21c8e62498ec67c5435512addec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?maxin=5B=E9=A9=AC=E9=91=AB=5D?= Date: Tue, 26 Apr 2016 10:16:53 +0800 Subject: [PATCH] remove redundancy code and add port confict tip --- app.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app.go b/app.go index af54ea4b..cdcfbe94 100644 --- a/app.go +++ b/app.go @@ -137,12 +137,14 @@ func (app *App) Run() { } // run normal mode - app.Server.Addr = addr if BConfig.Listen.EnableHTTPS { go func() { time.Sleep(20 * time.Microsecond) if BConfig.Listen.HTTPSPort != 0 { app.Server.Addr = fmt.Sprintf("%s:%d", BConfig.Listen.HTTPSAddr, BConfig.Listen.HTTPSPort) + } else if BConfig.Listen.EnableHTTP { + BeeLogger.Info("Start https server error, confict with http.Please reset https port") + return } BeeLogger.Info("https server Running on %s", app.Server.Addr) if err := app.Server.ListenAndServeTLS(BConfig.Listen.HTTPSCertFile, BConfig.Listen.HTTPSKeyFile); err != nil {