connectionmanager: do not cancel all waiting channel if first is declined

backport of 22d5417da3023095695d3b9655403b5632f528db in jami-daemon

Change-Id: I865617ff71d1a5fc96fd075b23cd8f85dc7e6599
diff --git a/src/multiplexed_socket.cpp b/src/multiplexed_socket.cpp
index 5abf742..dd6c298 100644
--- a/src/multiplexed_socket.cpp
+++ b/src/multiplexed_socket.cpp
@@ -283,7 +283,7 @@
     }
 
     onChannelReady_(deviceId, socket);
-    socket->ready();
+    socket->ready(true);
     // Due to the callbacks that can take some time, onAccept can arrive after
     // receiving all the data. In this case, the socket should be removed here
     // as handle by onChannelReady_
@@ -420,7 +420,7 @@
 
     if (accept) {
         onChannelReady_(deviceId, channelSocket);
-        channelSocket->ready();
+        channelSocket->ready(true);
     }
 }
 
@@ -448,6 +448,7 @@
                     std::lock_guard<std::mutex> lkSockets(pimpl.socketsMutex);
                     auto channel = pimpl.sockets.find(req.channel);
                     if (channel != pimpl.sockets.end()) {
+                        channel->second->ready(false);
                         channel->second->stop();
                         pimpl.sockets.erase(channel);
                     }
@@ -1074,10 +1075,10 @@
 }
 
 void
-ChannelSocket::ready()
+ChannelSocket::ready(bool accepted)
 {
     if (pimpl_->readyCb_)
-        pimpl_->readyCb_();
+        pimpl_->readyCb_(accepted);
 }
 
 void