Skip to content

Commit

Permalink
using io.ReadFull in uot's ReadFrom
Browse files Browse the repository at this point in the history
  • Loading branch information
wwqgtxx committed Sep 21, 2023
1 parent 57f342a commit 494f88c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/uot/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (c *Conn) ReadFrom(p []byte) (n int, addr net.Addr, err error) {
err = E.Cause(io.ErrShortBuffer, "UoT read")
return
}
n, err = c.Conn.Read(p[:length])
n, err = io.ReadFull(c.Conn, p[:length])
if err == nil {
addr = destination.UDPAddr()
}
Expand Down

0 comments on commit 494f88c

Please # to comment.