diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-10-16 05:52:40 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-08-18 23:25:46 +0200 |
commit | 1a81bee032113578dbba9641d3710158c21d4798 (patch) | |
tree | 1273a4c6163edcd78289d995495a3b330dfaaf1b /src | |
parent | 8966e899636a22bc30ac61ebf96e44681d1395b5 (diff) |
Listen on receive custom msg key
Diffstat (limited to 'src')
-rw-r--r-- | src/Database.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Database.cpp b/src/Database.cpp index 5ff3460..50b5044 100644 --- a/src/Database.cpp +++ b/src/Database.cpp @@ -647,6 +647,9 @@ 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) { |