mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 21:34:02 +03:00
Fix lint issues
This commit is contained in:
@@ -38,8 +38,8 @@ func pump(log Logger, src, dst essentials.Conn, wg *sync.WaitGroup, direction st
|
|||||||
defer func() {
|
defer func() {
|
||||||
syncer.Flush()
|
syncer.Flush()
|
||||||
releaseSyncPair(syncer)
|
releaseSyncPair(syncer)
|
||||||
src.CloseRead()
|
src.CloseRead() // nolint: errcheck
|
||||||
dst.CloseWrite()
|
dst.CloseWrite() // nolint: errcheck
|
||||||
wg.Done()
|
wg.Done()
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ func (s *syncPair) Write(p []byte) (int, error) {
|
|||||||
s.mutex.Lock()
|
s.mutex.Lock()
|
||||||
defer s.mutex.Unlock()
|
defer s.mutex.Unlock()
|
||||||
|
|
||||||
n, err := s.writer.Write(p) // nolint: wrapcheck
|
n, err := s.writer.Write(p)
|
||||||
|
|
||||||
// optimization for a case when we have a small package and want to avoid a
|
// optimization for a case when we have a small package and want to avoid a
|
||||||
// delay in readTimeout. In that case, we assume that peer has finished to
|
// delay in readTimeout. In that case, we assume that peer has finished to
|
||||||
@@ -52,7 +52,7 @@ func (s *syncPair) Write(p []byte) (int, error) {
|
|||||||
err = s.writer.Flush()
|
err = s.writer.Flush()
|
||||||
}
|
}
|
||||||
|
|
||||||
return n, err
|
return n, err // nolint: wrapcheck
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *syncPair) Flush() error {
|
func (s *syncPair) Flush() error {
|
||||||
|
|||||||
Reference in New Issue
Block a user