mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
dns: set timout only when multiple upstream dns servers set
This commit is contained in:
1 parent
9c73e969ca
commit
7274dcf622
2 files changed
+5
-2
No files matched your search
+1
-1
@@ -119,7 +119,7 @@ func (m *Message) Marshal() ([]byte, error) {
|
||||
|
||||
// UnmarshalMessage unmarshals []bytes to Message
|
||||
func UnmarshalMessage(b []byte) (*Message, error) {
|
||||
if len(b) <= 2+HeaderLen {
|
||||
if len(b) < HeaderLen {
|
||||
return nil, errors.New("UnmarshalMessage: not enough data")
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user