diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-10-19 23:10:36 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-08-18 23:25:46 +0200 |
commit | 557e2a07a6611023d7f565a93287b0d32b43efb2 (patch) | |
tree | 569d68f5098df642d68a141f1f4bc67ce92dd1c2 /src | |
parent | a1cd134644796400d4c09991c97663be1eaeb306 (diff) |
Add put retry
Diffstat (limited to 'src')
-rw-r--r-- | src/Database.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/Database.cpp b/src/Database.cpp index 50b5044..4422e1c 100644 --- a/src/Database.cpp +++ b/src/Database.cpp @@ -647,9 +647,6 @@ namespace odhtdb { InfoHash responseKey = receiveMessageKey; ++responseKey[0]; - - if(!bootstrapConnection.areWeListeningOnKey(responseKey.getKey())) - bootstrapConnection.listen(responseKey.getKey(), nullptr); return bootstrapConnection.listen(receiveMessageKey.getKey(), [callbackFunc, this, responseKey](const sibs::DirectConnectionPeer *peer, const void *data, const usize size) { @@ -664,11 +661,6 @@ namespace odhtdb void Database::sendCustomMessage(const InfoHash &requestKey, const void *data, const usize size) { - if(!bootstrapConnection.areWeListeningOnKey(requestKey.getKey())) - { - bootstrapConnection.listen(requestKey.getKey(), nullptr); - std::this_thread::sleep_for(std::chrono::seconds(3)); - } bootstrapConnection.put(requestKey.getKey(), data, size); } |