From 507d218433ab96564d8f77b57acf3f35bddeb0f8 Mon Sep 17 00:00:00 2001 From: Mrs4s Date: Tue, 5 Jan 2021 00:20:31 +0800 Subject: [PATCH] timeout. --- client/highway.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/highway.go b/client/highway.go index ed92c352..3a81a1fc 100644 --- a/client/highway.go +++ b/client/highway.go @@ -267,7 +267,8 @@ func (c *QQClient) highwayUploadFileMultiThreadingByBDH(path string, cmdId int32 } block := blocks[nextId] if block.Id == len(blocks)-1 { - for uploadedCount() != len(blocks)-1 && lastErr == nil { + t := time.Now() + for uploadedCount() != len(blocks)-1 && lastErr == nil && time.Now().Sub(t).Seconds() < 5 { time.Sleep(time.Millisecond * 10) } if lastErr != nil {