mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 04:21:51 +00:00
InfoHash: add explicit operator bool()
This commit is contained in:
1 parent
fcaaa01b2d
commit
dc99919338
8 files changed
+27
-17
No files matched your search
+1
-1
@@ -33,7 +33,7 @@ NodeCache::getNode(const InfoHash& id, sa_family_t family) {
|
||||
|
||||
Sp<Node>
|
||||
NodeCache::getNode(const InfoHash& id, const SockAddr& addr, time_point now, bool confirm, bool client) {
|
||||
if (id == zeroes)
|
||||
if (not id)
|
||||
return std::make_shared<Node>(id, addr);
|
||||
return cache(addr.getFamily()).getNode(id, addr, now, confirm, client);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user