From 86f2e5b066adec276e4bd72257b581ca95d64202 Mon Sep 17 00:00:00 2001 From: xtaci Date: Tue, 7 Feb 2023 22:17:00 +0800 Subject: [PATCH] upd deps to smux --- go.mod | 2 +- go.sum | 2 ++ vendor/github.com/xtaci/smux/shaper.go | 10 ++-------- vendor/modules.txt | 2 +- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index a77cce69e..1df8b2443 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/urfave/cli v1.22.12 github.com/xtaci/kcp-go/v5 v5.6.2 - github.com/xtaci/smux v1.5.18 + github.com/xtaci/smux v1.5.19 github.com/xtaci/tcpraw v1.2.25 golang.org/x/crypto v0.5.0 ) diff --git a/go.sum b/go.sum index 66b999181..49e9e59b4 100644 --- a/go.sum +++ b/go.sum @@ -72,6 +72,8 @@ github.com/xtaci/lossyconn v0.0.0-20190602105132-8df528c0c9ae h1:J0GxkO96kL4WF+A github.com/xtaci/lossyconn v0.0.0-20190602105132-8df528c0c9ae/go.mod h1:gXtu8J62kEgmN++bm9BVICuT/e8yiLI2KFobd/TRFsE= github.com/xtaci/smux v1.5.18 h1:NRH2dIxcO1w5dsNpQxSrxfhxjk4YNg6TrS/Nj0FuUPc= github.com/xtaci/smux v1.5.18/go.mod h1:OMlQbT5vcgl2gb49mFkYo6SMf+zP3rcjcwQz7ZU7IGY= +github.com/xtaci/smux v1.5.19 h1:QFoVBZPuJnoTs8QQ52TO2469nz8KxGHDpiEb+s3QzCQ= +github.com/xtaci/smux v1.5.19/go.mod h1:OMlQbT5vcgl2gb49mFkYo6SMf+zP3rcjcwQz7ZU7IGY= github.com/xtaci/tcpraw v1.2.25 h1:VDlqo0op17JeXBM6e2G9ocCNLOJcw9mZbobMbJjo0vk= github.com/xtaci/tcpraw v1.2.25/go.mod h1:dKyZ2V75s0cZ7cbgJYdxPvms7af0joIeOyx1GgJQbLk= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= diff --git a/vendor/github.com/xtaci/smux/shaper.go b/vendor/github.com/xtaci/smux/shaper.go index 0cc82b169..35773ee1f 100644 --- a/vendor/github.com/xtaci/smux/shaper.go +++ b/vendor/github.com/xtaci/smux/shaper.go @@ -6,14 +6,8 @@ func _itimediff(later, earlier uint32) int32 { type shaperHeap []writeRequest -func (h shaperHeap) Len() int { return len(h) } -func (h shaperHeap) Less(i, j int) bool { - if h[i].frame.sid == h[j].frame.sid { - return _itimediff(h[j].seq, h[i].seq) > 0 - } else { - return _itimediff(h[j].prio, h[i].prio) > 0 - } -} +func (h shaperHeap) Len() int { return len(h) } +func (h shaperHeap) Less(i, j int) bool { return _itimediff(h[j].seq, h[i].seq) > 0 } func (h shaperHeap) Swap(i, j int) { h[i], h[j] = h[j], h[i] } func (h *shaperHeap) Push(x interface{}) { *h = append(*h, x.(writeRequest)) } diff --git a/vendor/modules.txt b/vendor/modules.txt index 5096adc5e..6ee3e0657 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -38,7 +38,7 @@ github.com/urfave/cli # github.com/xtaci/kcp-go/v5 v5.6.2 ## explicit; go 1.13 github.com/xtaci/kcp-go/v5 -# github.com/xtaci/smux v1.5.18 +# github.com/xtaci/smux v1.5.19 ## explicit; go 1.13 github.com/xtaci/smux # github.com/xtaci/tcpraw v1.2.25