client: add Context::connect()

A means of manually (pre)populating
the channel cache.
This commit is contained in:
Michael Davidsaver
2021-06-08 09:45:49 -07:00
parent da004bc54b
commit 564b9ec2cc
5 changed files with 180 additions and 2 deletions
+8
View File
@@ -340,6 +340,14 @@ void Connection::handle_CREATE_CHANNEL()
chan->name.c_str(), unsigned(chan->cid), unsigned(chan->sid));
chan->createOperations();
auto conns(chan->connectors); // copy list
for(auto& conn : conns) {
conn->_connected.store(true, std::memory_order_relaxed);
if(conn->_onConn)
conn->_onConn();
}
}
}