From 1a81bee032113578dbba9641d3710158c21d4798 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 16 Oct 2018 05:52:40 +0200 Subject: Listen on receive custom msg key --- src/Database.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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) { -- cgit v1.2.3