forked from quic-go/quic-go
Merge pull request #927 from lucas-clemente/fix-925
fix client handshake failure when the server supports unknown versions
This commit is contained in:
@@ -329,8 +329,8 @@ func (c *client) handleVersionNegotiationPacket(hdr *wire.Header) error {
|
||||
|
||||
c.receivedVersionNegotiationPacket = true
|
||||
|
||||
newVersion := protocol.ChooseSupportedVersion(c.config.Versions, hdr.SupportedVersions)
|
||||
if newVersion == protocol.VersionUnsupported {
|
||||
newVersion, ok := protocol.ChooseSupportedVersion(c.config.Versions, hdr.SupportedVersions)
|
||||
if !ok {
|
||||
return qerr.InvalidVersion
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user