From dfadaca0ec80e58cd151a1014c5418ea08fe2998 Mon Sep 17 00:00:00 2001 From: qydysky Date: Fri, 14 May 2021 12:00:59 +0800 Subject: [PATCH] =?utf8?q?=E4=BA=BA=E6=B0=94=E7=B2=BE=E7=AE=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Reply/F.go | 8 +++++++- Reply/Reply.go | 4 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Reply/F.go b/Reply/F.go index c48bcca..ec43ab5 100644 --- a/Reply/F.go +++ b/Reply/F.go @@ -777,6 +777,12 @@ func Savestreamf(){ } }(bc,&item,exit_chan) + expires := int64(exp) - p.Sys().GetSTime()-120 + // no expect qn + if c.Live_want_qn < c.Live_qn { + expires = time.Now().Add(time.Minute*2).Unix() + } + //等待过期/退出 { var exit_sign bool @@ -784,7 +790,7 @@ func Savestreamf(){ case <- req_exit.Chan:;//本次连接错误,退出重试 case <- exit_chan.Chan://要求退出 exit_sign = true// - case <- time.After(time.Second*time.Duration(int(int64(exp) - p.Sys().GetSTime())-120)):; + case <- time.After(time.Second*time.Duration(int(expires))):; } if exit_sign { //退出 diff --git a/Reply/Reply.go b/Reply/Reply.go index 67a85d9..b6ecd4b 100644 --- a/Reply/Reply.go +++ b/Reply/Reply.go @@ -269,7 +269,9 @@ func (replyF) heartbeat(s int){ tmp = `(`+tmp+`)` } - fmt.Printf("\t人气:%d %s\n", s, tmp) + if renqi_old != s { + fmt.Printf("\t人气:%d %s\n", s, tmp) + } reply_log.Base_add(`人气`).Log_show_control(false).L(`I: `,"当前人气", s) renqi_old = s } -- 2.39.2