mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-29 16:58:34 +00:00
Move from deprecated ioutil to os and io packages (#744)
This commit is contained in:
parent
1ef824c0b4
commit
4abf98c1be
17 changed files with 29 additions and 43 deletions
|
@ -9,7 +9,6 @@ import (
|
|||
"encoding/binary"
|
||||
"hash/fnv"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
|
@ -499,6 +498,6 @@ func (s *ServerSession) EncodeResponseBody(request *protocol.RequestHeader, writ
|
|||
}
|
||||
|
||||
func (s *ServerSession) DrainConnN(reader io.Reader, n int) error {
|
||||
_, err := io.CopyN(ioutil.Discard, reader, int64(n))
|
||||
_, err := io.CopyN(io.Discard, reader, int64(n))
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue