replace deprecated method

This commit is contained in:
Charles Xu
2023-09-18 10:16:48 +00:00
parent 03721e8c7e
commit 7833ca8bc6
11 changed files with 19 additions and 22 deletions

View File

@ -3,7 +3,6 @@ package ss
import (
"context"
"io"
"io/ioutil"
"net"
"time"
@ -92,7 +91,7 @@ func (h *ssHandler) Handle(ctx context.Context, conn net.Conn, opts ...handler.H
addr := &gosocks5.Addr{}
if _, err := addr.ReadFrom(conn); err != nil {
log.Error(err)
io.Copy(ioutil.Discard, conn)
io.Copy(io.Discard, conn)
return err
}