Remove disconnected IrcClients
This commit is contained in:
@@ -94,6 +94,14 @@ void XmppComponent::shutdown()
|
||||
}
|
||||
}
|
||||
|
||||
void XmppComponent::clean()
|
||||
{
|
||||
for (auto it = this->bridges.begin(); it != this->bridges.end(); ++it)
|
||||
{
|
||||
it->second->clean();
|
||||
}
|
||||
}
|
||||
|
||||
void XmppComponent::on_remote_stream_open(const XmlNode& node)
|
||||
{
|
||||
log_debug("XMPP DOCUMENT OPEN: " << node.to_string());
|
||||
|
||||
@@ -31,6 +31,11 @@ public:
|
||||
*/
|
||||
void shutdown();
|
||||
bool is_document_open() const;
|
||||
/**
|
||||
* Run a check on all bridges, to remove all disconnected (socket is
|
||||
* closed, or no channel is joined) IrcClients. Some kind of garbage collector.
|
||||
*/
|
||||
void clean();
|
||||
/**
|
||||
* Connect to the XMPP server.
|
||||
* Returns false if we failed to connect
|
||||
|
||||
Reference in New Issue
Block a user