Code Optimization
This commit is contained in:
parent
2dde03d5c4
commit
a1d77463da
@ -162,12 +162,16 @@ func getAddressFromQuestionListRetry(targetIP []byte, ndpQuestionChan chan *ndpQ
|
|||||||
if success {
|
if success {
|
||||||
return result, true
|
return result, true
|
||||||
}
|
}
|
||||||
select {
|
forloop:
|
||||||
case q := <-ndpQuestionChan:
|
for {
|
||||||
ndpQuestionsList = append(ndpQuestionsList, q)
|
select {
|
||||||
default:
|
case q := <-ndpQuestionChan:
|
||||||
return nil, false
|
ndpQuestionsList = append(ndpQuestionsList, q)
|
||||||
|
default:
|
||||||
|
break forloop
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
result, success = getAddressFromQuestionList(targetIP, ndpQuestionsList)
|
result, success = getAddressFromQuestionList(targetIP, ndpQuestionsList)
|
||||||
return result, success
|
return result, success
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user