diff options
Diffstat (limited to 'libdino/src/service')
-rw-r--r-- | libdino/src/service/connection_manager.vala | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libdino/src/service/connection_manager.vala b/libdino/src/service/connection_manager.vala index 6a7964a0..67763ad3 100644 --- a/libdino/src/service/connection_manager.vala +++ b/libdino/src/service/connection_manager.vala @@ -168,7 +168,9 @@ public class ConnectionManager : Object { }); stream.get_module(Sasl.Module.IDENTITY).received_auth_failure.connect((stream, node) => { set_connection_error(account, new ConnectionError(ConnectionError.Source.SASL, null)); - change_connection_state(account, ConnectionState.DISCONNECTED); + }); + stream.get_module(Tls.Module.IDENTITY).invalid_certificate.connect(() => { + set_connection_error(account, new ConnectionError(ConnectionError.Source.TLS, null) { reconnect_recomendation=ConnectionError.Reconnect.NEVER}); }); stream.received_node.connect(() => { connections[account].last_activity = new DateTime.now_utc(); @@ -188,10 +190,6 @@ public class ConnectionManager : Object { if (!connection_todo.contains(account)) { return; } - if (e is IOStreamError.TLS) { - set_connection_error(account, new ConnectionError(ConnectionError.Source.TLS, e.message) { reconnect_recomendation=ConnectionError.Reconnect.NEVER}); - return; - } StreamError.Flag? flag = stream.get_flag(StreamError.Flag.IDENTITY); if (flag != null) { set_connection_error(account, new ConnectionError(ConnectionError.Source.STREAM_ERROR, flag.error_type) { resource_rejected=flag.resource_rejected }); |