fix: устранение предупреждений линтера
This commit is contained in:
1 parent
53b8345aa0
commit
65bc8a8993
4 files changed
+6
-5
No files matched your search
@@ -5,7 +5,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
func u8(v int) byte { return byte(v) }
|
func u8(v int) byte { return byte(v & 0xFF) }
|
||||||
|
|
||||||
func buildClientHello(host string) []byte {
|
func buildClientHello(host string) []byte {
|
||||||
hn := []byte(host)
|
hn := []byte(host)
|
||||||
|
|||||||
@@ -161,7 +161,8 @@ func oneDTLS(ctx context.Context, deps *Deps, params *Params, peer *net.UDPAddr,
|
|||||||
if addr == nil {
|
if addr == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if _, err = listenConn.WriteTo(buf[:n], addr.(net.Addr)); err != nil {
|
_, writeErr := listenConn.WriteTo(buf[:n], addr.(net.Addr))
|
||||||
|
if writeErr != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -336,7 +336,7 @@ func (s *Session) relay(ctx context.Context, prov provider.Provider, peer *net.U
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if s.deps.LocalPipe == nil {
|
if s.deps.LocalPipe == nil {
|
||||||
defer local.Close()
|
defer func() { _ = local.Close() }()
|
||||||
}
|
}
|
||||||
|
|
||||||
dialer := &dtlsdial.Dialer{
|
dialer := &dtlsdial.Dialer{
|
||||||
|
|||||||
@@ -147,8 +147,8 @@ func TestSinglePeerBindReopenAfterClose(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
in := []byte("response")
|
in := []byte("response")
|
||||||
if _, err := relay.WriteTo(in, nil); err != nil {
|
if _, writeErr := relay.WriteTo(in, nil); writeErr != nil {
|
||||||
t.Fatal(err)
|
t.Fatalf("relay.WriteTo: %v", writeErr)
|
||||||
}
|
}
|
||||||
packets := [][]byte{make([]byte, 64)}
|
packets := [][]byte{make([]byte, 64)}
|
||||||
sizes := make([]int, 1)
|
sizes := make([]int, 1)
|
||||||
|
|||||||
Reference in new issue
Block a user