aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/BootstrapConnection.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/BootstrapConnection.cpp b/src/BootstrapConnection.cpp
index f09547e..1e1ac43 100644
--- a/src/BootstrapConnection.cpp
+++ b/src/BootstrapConnection.cpp
@@ -85,9 +85,14 @@ namespace sibs
// TODO: This is vulnerable against MitM attack, replace with asymmetric cryptography, get data signed with server private key and verify against known server public key
void BootstrapConnection::receiveDataFromServer(std::shared_ptr<DirectConnectionPeer> peer, MessageType messageType, const void *data, const usize size)
{
- if(messageType != MessageType::SUBSCRIBE)
+ if(messageType == MessageType::DATA)
+ {
+ receiveDataFromPeer(peer, messageType, data, size);
+ return;
+ }
+ else if(messageType != MessageType::SUBSCRIBE)
{
- Log::warn("BootstrapConnection::receiveDataFromServer: received message from server that was not subscribe");
+ Log::warn("BootstrapConnection::receiveDataFromServer: received message from server that was not subscribe or data");
return;
}