aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/core/direct_tls_xmpp_stream.vala
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2023-01-31 15:12:39 +0100
committerMarvin W <git@larma.de>2023-02-07 10:50:43 +0100
commit18321ed15ce782ff5d1f24de9f2fb459d714d125 (patch)
treebaf849afe826691b351110b8899701f698692eb9 /xmpp-vala/src/core/direct_tls_xmpp_stream.vala
parent95fefaff51e5506d3f0e5fe8bced14aeb3fbe037 (diff)
downloaddino-18321ed15ce782ff5d1f24de9f2fb459d714d125.tar.gz
dino-18321ed15ce782ff5d1f24de9f2fb459d714d125.zip
Collapse most stream releated errors into IOError
Diffstat (limited to 'xmpp-vala/src/core/direct_tls_xmpp_stream.vala')
-rw-r--r--xmpp-vala/src/core/direct_tls_xmpp_stream.vala6
1 files changed, 4 insertions, 2 deletions
diff --git a/xmpp-vala/src/core/direct_tls_xmpp_stream.vala b/xmpp-vala/src/core/direct_tls_xmpp_stream.vala
index aec17acd..26adc90f 100644
--- a/xmpp-vala/src/core/direct_tls_xmpp_stream.vala
+++ b/xmpp-vala/src/core/direct_tls_xmpp_stream.vala
@@ -13,7 +13,7 @@ public class Xmpp.DirectTlsXmppStream : TlsXmppStream {
this.on_invalid_cert = on_invalid_cert;
}
- public override async void connect() throws IOStreamError {
+ public override async void connect() throws IOError {
SocketClient client = new SocketClient();
try {
debug("Connecting to %s:%i (tls)", host, port);
@@ -29,8 +29,10 @@ public class Xmpp.DirectTlsXmppStream : TlsXmppStream {
yield setup();
attach_negotation_modules();
+ } catch (IOError e) {
+ throw e;
} catch (Error e) {
- throw new IOStreamError.CONNECT("Failed connecting to %s:%i (tls): %s", host, port, e.message);
+ throw new IOError.CONNECTION_REFUSED("Failed connecting to %s:%i (tls): %s", host, port, e.message);
}
}
}