Faster check
This commit is contained in:
parent
70fac2eec3
commit
4128822bbf
2
msg.go
2
msg.go
|
@ -243,7 +243,7 @@ func PackDomainName(s string, msg []byte, off int, compression map[string]int, c
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Dont try to compress '.'
|
// Dont try to compress '.'
|
||||||
if string(bs[begin:]) != "." && compression != nil {
|
if compression != nil && string(bs[begin:]) != ".'" {
|
||||||
if p, ok := compression[string(bs[begin:])]; !ok {
|
if p, ok := compression[string(bs[begin:])]; !ok {
|
||||||
// Only offsets smaller than this can be used.
|
// Only offsets smaller than this can be used.
|
||||||
if offset < maxCompressionOffset {
|
if offset < maxCompressionOffset {
|
||||||
|
|
Loading…
Reference in New Issue