debug the late connect case

This commit is contained in:
Brad Hefta-Gaub 2015-11-17 14:43:06 -08:00
parent 85aa3b3f83
commit d8a3927311
2 changed files with 3 additions and 1 deletions

View file

@ -1,5 +1,5 @@
print("---- subscribing ----");
Messages.subscribe(channel);
Messages.subscribe("example");
Messages.messageReceived.connect(function (channel, message, senderID) {
print("message received on channel:" + channel + ", message:" + message + ", senderID:" + senderID);

View file

@ -101,7 +101,9 @@ void MessagesClient::unsubscribe(const QString& channel) {
void MessagesClient::handleNodeAdded(SharedNodePointer node) {
if (node->getType() == NodeType::MessagesMixer) {
qDebug() << "messages-mixer node type added...";
for (const auto& channel : _subscribedChannels) {
qDebug() << "subscribing to channel:" << channel;
subscribe(channel);
}
}