diff options
Diffstat (limited to 'src/xmpp')
-rw-r--r-- | src/xmpp/xmpp_component.cpp | 8 | ||||
-rw-r--r-- | src/xmpp/xmpp_component.hpp | 5 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/xmpp/xmpp_component.cpp b/src/xmpp/xmpp_component.cpp index dc77934..3c37eb1 100644 --- a/src/xmpp/xmpp_component.cpp +++ b/src/xmpp/xmpp_component.cpp @@ -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()); diff --git a/src/xmpp/xmpp_component.hpp b/src/xmpp/xmpp_component.hpp index 1952e19..d76a2c3 100644 --- a/src/xmpp/xmpp_component.hpp +++ b/src/xmpp/xmpp_component.hpp @@ -32,6 +32,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 */ |