From 184863cfc17a0ede7e080a5a73ac3227620e54c9 Mon Sep 17 00:00:00 2001 From: dec05eba <0xdec05eba@gmail.com> 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