]> 127.0.0.1 Git - bili_danmu/.git/commitdiff
Improve 避免写超时
authorqydysky <qydysky@foxmail.com>
Sun, 4 Jun 2023 18:06:34 +0000 (02:06 +0800)
committerqydysky <qydysky@foxmail.com>
Sun, 4 Jun 2023 18:06:34 +0000 (02:06 +0800)
Reply/stream.go
go.mod
go.sum

index 798d4bb1e1107e1bb3e0f7655a747c0b43aed599..0a29baebceeb55860e64fca2728ceae510c2a855 100644 (file)
@@ -1283,7 +1283,7 @@ func (t *M4SStream) PusherToFile(contextC context.Context, filepath string, star
        }
 
        _, _ = f.Write(t.getFirstBuf(), true)
-       t.Stream_msg.Pull_tag(map[string]func([]byte) bool{
+       t.Stream_msg.Pull_tag_async(map[string]func([]byte) bool{
                `data`: func(b []byte) bool {
                        select {
                        case <-contextC.Done():
@@ -1352,7 +1352,7 @@ func (t *M4SStream) PusherToHttp(w http.ResponseWriter, r *http.Request, startFu
        contextC, cancel := context.WithCancel(r.Context())
 
        //
-       t.Stream_msg.Pull_tag(map[string]func([]byte) bool{
+       t.Stream_msg.Pull_tag_async(map[string]func([]byte) bool{
                `data`: func(b []byte) bool {
                        select {
                        case <-contextC.Done():
diff --git a/go.mod b/go.mod
index 9fe4ce4e8a4b8af1444ad61b5be84e0b9ba7ba7f..6961aa2e66e027a29b8fdc2de11aa86c05110475 100644 (file)
--- a/go.mod
+++ b/go.mod
@@ -5,7 +5,7 @@ go 1.20
 require (
        github.com/gotk3/gotk3 v0.6.2
        github.com/mdp/qrterminal/v3 v3.1.1
-       github.com/qydysky/part v0.28.1-0.20230602190805-e713cd3914aa
+       github.com/qydysky/part v0.28.1-0.20230604175129-19d1532a8fbc
        github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
        github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
        golang.org/x/text v0.9.0
diff --git a/go.sum b/go.sum
index 8377a1e7d3b84c3b8a6aa65caa3283f88e30c904..af8bac7642f4a9bafaae5e867c19355c807f39fb 100644 (file)
--- a/go.sum
+++ b/go.sum
@@ -32,6 +32,8 @@ github.com/qydysky/part v0.28.1-0.20230602174331-a838e316668d h1:NDk77uktMXlfEXJ
 github.com/qydysky/part v0.28.1-0.20230602174331-a838e316668d/go.mod h1:xSAOQyg7Wyd+QtXxmHBodYzx3y5HJnfr4R29MXxNKF4=
 github.com/qydysky/part v0.28.1-0.20230602190805-e713cd3914aa h1:CBCY0tJB8M0KwmZ/BIoydBrBYV0lpgPLGCgT3YaGSLY=
 github.com/qydysky/part v0.28.1-0.20230602190805-e713cd3914aa/go.mod h1:xSAOQyg7Wyd+QtXxmHBodYzx3y5HJnfr4R29MXxNKF4=
+github.com/qydysky/part v0.28.1-0.20230604175129-19d1532a8fbc h1:EAfIfYh3wOMqsriiDPzQo6KfGXIMpCpmaTLg8Z6j0eo=
+github.com/qydysky/part v0.28.1-0.20230604175129-19d1532a8fbc/go.mod h1:xSAOQyg7Wyd+QtXxmHBodYzx3y5HJnfr4R29MXxNKF4=
 github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
 github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
 github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=