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