From: qydysky Date: Sun, 19 May 2024 10:00:16 +0000 (+0000) Subject: Improve 设置直播流写入超时 X-Git-Tag: v0.14.1~3 X-Git-Url: http://127.0.0.1:8081/?a=commitdiff_plain;h=26c8b6c40506b199c0ed9bcf95ff9f531012e505;p=bili_danmu%2F.git Improve 设置直播流写入超时 --- diff --git a/Reply/stream.go b/Reply/stream.go index 9c2042b..8365b51 100644 --- a/Reply/stream.go +++ b/Reply/stream.go @@ -1458,6 +1458,7 @@ func (t *M4SStream) PusherToHttp(conn net.Conn, w http.ResponseWriter, r *http.R if len(b) == 0 { return true } + _ = conn.SetWriteDeadline(time.Now().Add(time.Second * 30)) if n, err := w.Write(b); err != nil || n == 0 { return true }