From de133218dab0ac1729dbfc32177979133c15f53b Mon Sep 17 00:00:00 2001 From: fiaxh Date: Tue, 21 Nov 2017 23:27:27 +0100 Subject: Disconnect stanza listeners from pipeline --- xmpp-vala/src/module/xep/0085_chat_state_notifications.vala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'xmpp-vala/src/module/xep/0085_chat_state_notifications.vala') diff --git a/xmpp-vala/src/module/xep/0085_chat_state_notifications.vala b/xmpp-vala/src/module/xep/0085_chat_state_notifications.vala index 3ca97282..e92763fb 100644 --- a/xmpp-vala/src/module/xep/0085_chat_state_notifications.vala +++ b/xmpp-vala/src/module/xep/0085_chat_state_notifications.vala @@ -18,6 +18,8 @@ public class Module : XmppStreamModule { public signal void chat_state_received(XmppStream stream, string jid, string state); + private SendPipelineListener send_pipeline_listener = new SendPipelineListener(); + /** * "A message stanza that does not contain standard messaging content [...] SHOULD be a state other than " (0085, 5.6) */ @@ -31,12 +33,13 @@ public class Module : XmppStreamModule { public override void attach(XmppStream stream) { stream.get_module(ServiceDiscovery.Module.IDENTITY).add_feature(stream, NS_URI); - stream.get_module(Message.Module.IDENTITY).send_pipeline.connect(new SendPipelineListener()); + stream.get_module(Message.Module.IDENTITY).send_pipeline.connect(send_pipeline_listener); stream.get_module(Message.Module.IDENTITY).received_message.connect(on_received_message); } public override void detach(XmppStream stream) { stream.get_module(Message.Module.IDENTITY).received_message.disconnect(on_received_message); + stream.get_module(Message.Module.IDENTITY).send_pipeline.disconnect(send_pipeline_listener); } public override string get_ns() { return NS_URI; } -- cgit v1.2.3-54-g00ecf