mirror of
https://github.com/apernet/hysteria.git
synced 2025-04-03 20:47:38 +03:00
chore: fix typo (ErrMessageToLarge -> ErrMessageTooLarge)
This commit is contained in:
parent
fc28c01980
commit
392cde1120
7 changed files with 134 additions and 9 deletions
|
@ -414,7 +414,7 @@ func (c *hyUDPConn) WriteTo(p []byte, addr string) error {
|
|||
_ = struc.Pack(&msgBuf, &msg)
|
||||
err = c.Session.SendMessage(msgBuf.Bytes())
|
||||
if err != nil {
|
||||
if errSize, ok := err.(quic.ErrMessageToLarge); ok {
|
||||
if errSize, ok := err.(quic.ErrMessageTooLarge); ok {
|
||||
// need to frag
|
||||
msg.MsgID = uint16(rand.Intn(0xFFFF)) + 1 // msgID must be > 0 when fragCount > 1
|
||||
fragMsgs := fragUDPMessage(msg, int(errSize))
|
||||
|
|
|
@ -336,7 +336,7 @@ func (c *serverClient) handleUDP(stream quic.Stream) {
|
|||
_ = struc.Pack(&msgBuf, &msg)
|
||||
sendErr := c.CC.SendMessage(msgBuf.Bytes())
|
||||
if sendErr != nil {
|
||||
if errSize, ok := sendErr.(quic.ErrMessageToLarge); ok {
|
||||
if errSize, ok := sendErr.(quic.ErrMessageTooLarge); ok {
|
||||
// need to frag
|
||||
msg.MsgID = uint16(rand.Intn(0xFFFF)) + 1 // msgID must be > 0 when fragCount > 1
|
||||
fragMsgs := fragUDPMessage(msg, int(errSize))
|
||||
|
|
|
@ -43,4 +43,4 @@ require (
|
|||
google.golang.org/protobuf v1.28.1 // indirect
|
||||
)
|
||||
|
||||
replace github.com/lucas-clemente/quic-go => github.com/apernet/quic-go v0.31.1-0.20221126080508-c4a37bf8f6d7
|
||||
replace github.com/lucas-clemente/quic-go => github.com/apernet/quic-go v0.31.1-0.20221208013043-a01b50646f2c
|
||||
|
|
|
@ -38,8 +38,8 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy
|
|||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
|
||||
github.com/apernet/quic-go v0.31.1-0.20221126080508-c4a37bf8f6d7 h1:wvamuH2V9V2JP60DMYrsn3k9nNkcXHttV4KQ8W3Ah1Y=
|
||||
github.com/apernet/quic-go v0.31.1-0.20221126080508-c4a37bf8f6d7/go.mod h1:0wFbizLgYzqHqtlyxyCaJKlE7bYgE6JQ+54TLd/Dq2g=
|
||||
github.com/apernet/quic-go v0.31.1-0.20221208013043-a01b50646f2c h1:YoKqNVd+1knWdkYD/VjDNgEV+5FDAXTylFWAZV9PAa0=
|
||||
github.com/apernet/quic-go v0.31.1-0.20221208013043-a01b50646f2c/go.mod h1:0wFbizLgYzqHqtlyxyCaJKlE7bYgE6JQ+54TLd/Dq2g=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue