aboutsummaryrefslogtreecommitdiffstats
path: root/trie
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-05-13 22:04:06 +0800
committerFelix Lange <fjl@twurst.com>2015-05-14 09:53:11 +0800
commit983f5a717a35a604847ae4a4964c19000dc44016 (patch)
treed8f667ef3ab140c3f8809ba41722e8a320d75e34 /trie
parentf7fdb4dfbe1a0851b6fb2970b0a6b11fd31273d6 (diff)
downloaddexon-983f5a717a35a604847ae4a4964c19000dc44016.tar.gz
dexon-983f5a717a35a604847ae4a4964c19000dc44016.tar.zst
dexon-983f5a717a35a604847ae4a4964c19000dc44016.zip
p2p/nat: fix concurrent access to autodisc Interface
Concurrent calls to Interface methods on autodisc could return a "not discovered" error if the discovery did not finish before the call. autodisc.wait expected the done channel to carry the found Interface but it was closed instead. The fix is to use sync.Once for now, which is easier to get right. And there is a test. Finally. This will have to change again when we introduce re-discovery.
Diffstat (limited to 'trie')
0 files changed, 0 insertions, 0 deletions