aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/core/starttls_xmpp_stream.vala
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2023-01-31 15:12:39 +0100
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-10-05 14:32:06 +0200
commit90caab10ab4453ecc0cab6c4d73048e51f96934f (patch)
tree1961f22440229829dad7fff0a60e14200d928a66 /xmpp-vala/src/core/starttls_xmpp_stream.vala
parent8818ec6c815301f2830e3e1d58157ebad4158685 (diff)
downloaddino-90caab10ab4453ecc0cab6c4d73048e51f96934f.tar.gz
Collapse most stream releated errors into IOError
Diffstat (limited to 'xmpp-vala/src/core/starttls_xmpp_stream.vala')
-rw-r--r--xmpp-vala/src/core/starttls_xmpp_stream.vala6
1 files changed, 4 insertions, 2 deletions
diff --git a/xmpp-vala/src/core/starttls_xmpp_stream.vala b/xmpp-vala/src/core/starttls_xmpp_stream.vala
index 2334f664..0d4fbc7d 100644
--- a/xmpp-vala/src/core/starttls_xmpp_stream.vala
+++ b/xmpp-vala/src/core/starttls_xmpp_stream.vala
@@ -13,7 +13,7 @@ public class Xmpp.StartTlsXmppStream : TlsXmppStream {
this.on_invalid_cert = on_invalid_cert;
}
- public override async void connect() throws IOStreamError {
+ public override async void connect() throws IOError {
try {
SocketClient client = new SocketClient();
debug("Connecting to %s:%i (starttls)", host, port);
@@ -50,8 +50,10 @@ public class Xmpp.StartTlsXmppStream : TlsXmppStream {
yield setup();
attach_negotation_modules();
+ } catch (IOError e) {
+ throw e;
} catch (Error e) {
- throw new IOStreamError.CONNECT("Failed connecting to %s:%i (starttls): %s", host, port, e.message);
+ throw new IOError.CONNECTION_REFUSED("Failed connecting to %s:%i (starttls): %s", host, port, e.message);
}
}
}