Software /
code /
prosody
Comparison
net/resolvers/basic.lua @ 12410:596625eed326
net.resolvers.basic: Indicate to callback if we have more targets available
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 18 Mar 2022 16:13:09 +0000 |
parent | 12409:9f0baf15e792 |
child | 12413:e155f4509954 |
comparison
equal
deleted
inserted
replaced
12409:9f0baf15e792 | 12410:596625eed326 |
---|---|
62 if #self.targets == 0 then | 62 if #self.targets == 0 then |
63 cb(nil); | 63 cb(nil); |
64 return; | 64 return; |
65 end | 65 end |
66 local next_target = table.remove(self.targets, 1); | 66 local next_target = table.remove(self.targets, 1); |
67 cb(next_target[1], next_target[2], next_target[3], next_target[4]); | 67 cb(next_target[1], next_target[2], next_target[3], next_target[4], not not self.targets[1]); |
68 return; | 68 return; |
69 end | 69 end |
70 | 70 |
71 if not self.hostname then | 71 if not self.hostname then |
72 self.last_error = "hostname failed IDNA"; | 72 self.last_error = "hostname failed IDNA"; |