优化连接处理逻辑,增加超时设置;重构命令读取与错误处理;新增公共工具函数以简化错误处理

This commit is contained in:
2025-05-26 16:37:54 +08:00
parent 8c928a8321
commit c2dcae7af5
7 changed files with 205 additions and 154 deletions

View File

@@ -17,7 +17,7 @@ import (
)
func ListenUser(ctx context.Context, port uint16, ctrl io.Writer) error {
dspt, err := dispatcher.New(port, time.Duration(env.AppUserTimeout)*time.Second)
dspt, err := dispatcher.New(port, time.Duration(env.AppUserRWTimeout)*time.Second)
if err != nil {
return err
}