summaryrefslogtreecommitdiff
path: root/vendor/github.com/gorilla/websocket/compression.go
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2024-06-10 07:43:38 +0000
committerLibravatar GitHub <noreply@github.com>2024-06-10 07:43:38 +0000
commita687f0634c48f5cdcc878a4b390a955d5d0cd9ad (patch)
tree8d2e4e7d0aca496781968b46b7aa5afb1dee71e9 /vendor/github.com/gorilla/websocket/compression.go
parent[chore]: Bump github.com/tdewolff/minify/v2 from 2.20.32 to 2.20.33 (#2984) (diff)
downloadgotosocial-a687f0634c48f5cdcc878a4b390a955d5d0cd9ad.tar.xz
[chore]: Bump github.com/gorilla/websocket from 1.5.1 to 1.5.2 (#2987)
Bumps [github.com/gorilla/websocket](https://github.com/gorilla/websocket) from 1.5.1 to 1.5.2. - [Release notes](https://github.com/gorilla/websocket/releases) - [Commits](https://github.com/gorilla/websocket/compare/v1.5.1...v1.5.2) --- updated-dependencies: - dependency-name: github.com/gorilla/websocket dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/gorilla/websocket/compression.go')
-rw-r--r--vendor/github.com/gorilla/websocket/compression.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/vendor/github.com/gorilla/websocket/compression.go b/vendor/github.com/gorilla/websocket/compression.go
index 9fed0ef52..813ffb1e8 100644
--- a/vendor/github.com/gorilla/websocket/compression.go
+++ b/vendor/github.com/gorilla/websocket/compression.go
@@ -8,7 +8,6 @@ import (
"compress/flate"
"errors"
"io"
- "log"
"strings"
"sync"
)
@@ -34,9 +33,7 @@ func decompressNoContextTakeover(r io.Reader) io.ReadCloser {
"\x01\x00\x00\xff\xff"
fr, _ := flateReaderPool.Get().(io.ReadCloser)
- if err := fr.(flate.Resetter).Reset(io.MultiReader(r, strings.NewReader(tail)), nil); err != nil {
- panic(err)
- }
+ fr.(flate.Resetter).Reset(io.MultiReader(r, strings.NewReader(tail)), nil)
return &flateReadWrapper{fr}
}
@@ -135,9 +132,7 @@ func (r *flateReadWrapper) Read(p []byte) (int, error) {
// Preemptively place the reader back in the pool. This helps with
// scenarios where the application does not call NextReader() soon after
// this final read.
- if err := r.Close(); err != nil {
- log.Printf("websocket: flateReadWrapper.Close() returned error: %v", err)
- }
+ r.Close()
}
return n, err
}