From 9f4e470246912e15ab211f5506ecf3832a8b6657 Mon Sep 17 00:00:00 2001 From: zhora Date: Sat, 25 Oct 2025 17:23:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E7=94=A8=E5=8D=8F=E7=A8=8B=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/web/providers/sn/handler.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/modules/web/providers/sn/handler.go b/modules/web/providers/sn/handler.go index 3ece138..c8cc40c 100644 --- a/modules/web/providers/sn/handler.go +++ b/modules/web/providers/sn/handler.go @@ -187,7 +187,10 @@ func GameBet(c *gin.Context) { resp.Msg = "success" log.Debug("sn gameBetResp, %s:%+v", account, resp) a.Data = resp - checkControl(uid) + go func() { + defer util.Recover() + checkControl(uid) + }() } func Settle(c *gin.Context) { @@ -658,11 +661,6 @@ func checkControl(uid int) { } if update { log.Debug("sn control update, uid:%d old info:%d|%s new info:%d|%s(%d|%d)", uid, rtp, templateId, rtpNow, templateIdNow, totalRecharge, defaultValue) - // todo 主动推会一直报错,兼容处理 - err = db.Redis().GetRedis().Set(context.Background(), fmt.Sprintf("player:%v:sn:status", uid), fmt.Sprintf("%d|%s", rtpNow, templateIdNow), 0).Err() - if err != nil { - log.Error("sn control, set user sn status err, %s", err.Error()) - } Control(uid, 0, templateIdNow, rtpNow) } }