]> 127.0.0.1 Git - front/.git/commitdiff
1 v0.1.20231203033112 v0.1.20231203033123
authorqydysky <qydysky@foxmail.com>
Sun, 3 Dec 2023 03:31:03 +0000 (11:31 +0800)
committerqydysky <qydysky@foxmail.com>
Sun, 3 Dec 2023 03:31:03 +0000 (11:31 +0800)
main.go

diff --git a/main.go b/main.go
index 6598f989abbdc89c598db0f0efa9d61ae2c070de..f91f572c2ab9cd60c9d582e225c9191a01142051 100644 (file)
--- a/main.go
+++ b/main.go
@@ -76,7 +76,7 @@ func Run(ctx context.Context, configSP *Config, logger *plog.Log_interface) {
        routeP := pweb.WebPath{}
 
        logger.L(`I:`, "启动...")
-       defer logger.L(`I:`, "退出...")
+       defer logger.L(`I:`, "退出,等待1min连接关闭...")
 
        // config对象初次加载
        if e := applyConfig(ctx, configSP, &routeP, logger); e != nil {
@@ -330,7 +330,7 @@ func wsDealer(ctx context.Context, w http.ResponseWriter, r *http.Request, route
                        fin := make(chan error)
                        reqc := req.NetConn()
                        resc := res.NetConn()
-                       ctx, cancle := pctx.WithWait(ctx, 2, time.Minute)
+                       ctx, cancle := pctx.WithWait(ctx, 2, time.Second*30)
                        defer func() {
                                if errors.Is(cancle(), pctx.ErrWaitTo) {
                                        logger.L(`E:`, "退出超时")