From 442c1fc27af627a4ec07d65e094054b076c3447c Mon Sep 17 00:00:00 2001 From: YouROK <8yourok8@mail.ru> Date: Tue, 8 Dec 2020 17:08:33 +0300 Subject: [PATCH] update --- src/server/torr/stream.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server/torr/stream.go b/src/server/torr/stream.go index d6a8390..1474073 100644 --- a/src/server/torr/stream.go +++ b/src/server/torr/stream.go @@ -24,7 +24,8 @@ func (t *Torrent) Stream(fileIndex int, req *http.Request, resp http.ResponseWri sets.SetViewed(&sets.Viewed{t.Hash().HexString(), fileIndex}) - resp.Header().Set("Connection", "close") + //TODO проверить почему плеер постоянно переподключается + resp.Header().Set("Connection", "keep-alive") resp.Header().Set("ETag", httptoo.EncodeQuotedString(fmt.Sprintf("%s/%s", t.Hash().HexString(), file.Path()))) http.ServeContent(resp, req, file.Path(), time.Time{}, reader)