mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 20:32:26 -05:00
[chore]: Bump github.com/gin-contrib/sessions from 0.0.5 to 1.0.0 (#2782)
This commit is contained in:
parent
a24936040c
commit
29031d1e27
93 changed files with 2888 additions and 969 deletions
21
vendor/github.com/klauspost/compress/s2/writer.go
generated
vendored
21
vendor/github.com/klauspost/compress/s2/writer.go
generated
vendored
|
|
@ -215,7 +215,7 @@ func (w *Writer) ReadFrom(r io.Reader) (n int64, err error) {
|
|||
return 0, err
|
||||
}
|
||||
if len(w.ibuf) > 0 {
|
||||
err := w.Flush()
|
||||
err := w.AsyncFlush()
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
|
@ -225,7 +225,7 @@ func (w *Writer) ReadFrom(r io.Reader) (n int64, err error) {
|
|||
if err := w.EncodeBuffer(buf); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
return int64(len(buf)), w.Flush()
|
||||
return int64(len(buf)), w.AsyncFlush()
|
||||
}
|
||||
for {
|
||||
inbuf := w.buffers.Get().([]byte)[:w.blockSize+obufHeaderLen]
|
||||
|
|
@ -354,7 +354,7 @@ func (w *Writer) EncodeBuffer(buf []byte) (err error) {
|
|||
}
|
||||
// Flush queued data first.
|
||||
if len(w.ibuf) > 0 {
|
||||
err := w.Flush()
|
||||
err := w.AsyncFlush()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -716,9 +716,9 @@ func (w *Writer) writeSync(p []byte) (nRet int, errRet error) {
|
|||
return nRet, nil
|
||||
}
|
||||
|
||||
// Flush flushes the Writer to its underlying io.Writer.
|
||||
// This does not apply padding.
|
||||
func (w *Writer) Flush() error {
|
||||
// AsyncFlush writes any buffered bytes to a block and starts compressing it.
|
||||
// It does not wait for the output has been written as Flush() does.
|
||||
func (w *Writer) AsyncFlush() error {
|
||||
if err := w.err(nil); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -738,6 +738,15 @@ func (w *Writer) Flush() error {
|
|||
}
|
||||
}
|
||||
}
|
||||
return w.err(nil)
|
||||
}
|
||||
|
||||
// Flush flushes the Writer to its underlying io.Writer.
|
||||
// This does not apply padding.
|
||||
func (w *Writer) Flush() error {
|
||||
if err := w.AsyncFlush(); err != nil {
|
||||
return err
|
||||
}
|
||||
if w.output == nil {
|
||||
return w.err(nil)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue