修复客户端断联未释放端口问题

This commit is contained in:
2025-03-05 14:14:11 +08:00
parent ae7fcfe484
commit 0144d1d46f
6 changed files with 134 additions and 128 deletions

View File

@@ -2,11 +2,8 @@ package env
import (
"fmt"
"log/slog"
"os"
"strconv"
"github.com/joho/godotenv"
)
var (
@@ -24,12 +21,6 @@ var (
func Init() {
// 加载 .env 文件
err := godotenv.Load()
if err != nil {
slog.Debug("没有本地环境变量文件")
}
// AppCtrlPort
appCtrlPortStr := os.Getenv("APP_CTRL_PORT")
if appCtrlPortStr == "" {