From 6907d7c8a28d9995a44a1ff93d902fde8648a64a Mon Sep 17 00:00:00 2001 From: Leufolium Date: Thu, 23 May 2024 22:47:33 +0800 Subject: [PATCH] by Robin at 20240523 --- app/mix/cmd_offline/main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/mix/cmd_offline/main.go b/app/mix/cmd_offline/main.go index 11a6ad56..876e5c79 100644 --- a/app/mix/cmd_offline/main.go +++ b/app/mix/cmd_offline/main.go @@ -107,14 +107,16 @@ func main() { // 初始化http server go exec.Run() + ip := GetIp() + port := cfg.App.Port router := httpengine.NewRouter() validator.InitDefaultNotNullValidator() controller.InitOffline(router) srv := &http.Server{ - Addr: fmt.Sprintf("%s:%d", GetIp(), cfg.App.Port), + Addr: fmt.Sprintf("%s:%d", ip, port), Handler: router, } - httpserver.StartHttpServer(srv, cfg.OfflineServer) + httpserver.StartHttpServer(srv, cfg.OfflineServer, ip, port) } func PrintAndExit(msg string) {