Skip to content

Commit

Permalink
Merge pull request #47 from SagerNet/wwqgtxx-patch-1
Browse files Browse the repository at this point in the history
using io.ReadFull in uot's ReadFrom
  • Loading branch information
wwqgtxx authored Sep 21, 2023
2 parents 57f342a + be9fcd1 commit 749b40b
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 749b40b

Please sign in to comment.