diff options
author | dec05eba <0xdec05eba@gmail.com> | 2018-10-16 05:52:40 +0200 |
---|---|---|
committer | dec05eba <0xdec05eba@gmail.com> | 2018-10-16 05:52:43 +0200 |
commit | 184863cfc17a0ede7e080a5a73ac3227620e54c9 (patch) | |
tree | 352866ca3d12a4b712760086ac28ca4917cf4c39 /src | |
parent | 1169a73ef72e296cc79da746b5d6d916714633c2 (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) { |