]> Cypherpunks repositories - gostls13.git/commitdiff
net: stop scanning for domain name once the first label has been found
authorMikio Hara <mikioh.mikioh@gmail.com>
Fri, 8 Jan 2016 18:47:40 +0000 (03:47 +0900)
committerMikio Hara <mikioh.mikioh@gmail.com>
Sat, 9 Jan 2016 03:30:40 +0000 (03:30 +0000)
Change-Id: I95c6c85eecb53ffe52b64d521180148b624e9424
Reviewed-on: https://go-review.googlesource.com/18423
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/dnsclient.go

index 98d1750a631bc82ee76bcf09d84cbad9c2a79c77..5dc2a0368ceeb242593f306884a1ba25a94aecb4 100644 (file)
@@ -174,6 +174,7 @@ func absDomainName(b []byte) string {
        for _, x := range b {
                if x == '.' {
                        hasDots = true
+                       break
                }
        }
        if hasDots && b[len(b)-1] != '.' {