diff options
author | fiaxh <git@lightrise.org> | 2020-07-21 15:48:42 +0200 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2020-07-21 15:48:42 +0200 |
commit | c887240fdcdbc8f76c6bdd37b1174b8154907c4c (patch) | |
tree | 889151d1947482a7da968c076b7bf8e09da91e8b /xmpp-vala/src/core/xmpp_stream.vala | |
parent | 7309c6f3ac4e580f197b4835d05bb011fa90780b (diff) | |
download | dino-c887240fdcdbc8f76c6bdd37b1174b8154907c4c.tar.gz dino-c887240fdcdbc8f76c6bdd37b1174b8154907c4c.zip |
Improve stream management queue
Diffstat (limited to 'xmpp-vala/src/core/xmpp_stream.vala')
-rw-r--r-- | xmpp-vala/src/core/xmpp_stream.vala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xmpp-vala/src/core/xmpp_stream.vala b/xmpp-vala/src/core/xmpp_stream.vala index 7e7588b1..ad4dae97 100644 --- a/xmpp-vala/src/core/xmpp_stream.vala +++ b/xmpp-vala/src/core/xmpp_stream.vala @@ -97,6 +97,8 @@ public class XmppStream { this.stream = stream; reader = new StanzaReader.for_stream(stream.input_stream); writer = new StanzaWriter.for_stream(stream.output_stream); + + writer.cancel.connect(reader.cancel); require_setup(); } @@ -123,7 +125,9 @@ public class XmppStream { [Version (deprecated = true, deprecated_since = "0.1", replacement = "write_async")] public void write(StanzaNode node) { write_async.begin(node, (obj, res) => { - write_async.end(res); + try { + write_async.end(res); + } catch (Error e) { } }); } |