chore: swap the const value of server hello reply

by setting StatusTCPOnly == 1, when a new version client connect to an
old version server, the client will treat the server as udp disabled and
will not submit a udp request or open a udp control stream.

this make the upgrade much more smoothly even if we don't change the
protocolVersion.
This commit is contained in:
Haruue Icymoon 2022-08-28 20:25:50 +08:00
parent 955a8a7470
commit 45fbdec453
No known key found for this signature in database
GPG key ID: F6083B28CBCBC148

View file

@ -27,8 +27,8 @@ type clientHello struct {
const (
serverHelloStatusFailed = uint8(0)
serverHelloStatusOK = uint8(1)
serverHelloStatusTCPOnly = uint8(2)
serverHelloStatusTCPOnly = uint8(1)
serverHelloStatusOK = uint8(2)
)
type serverHello struct {