diff options
author | fiaxh <git@mx.ax.lt> | 2018-11-17 11:02:54 +0100 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2018-11-21 18:01:54 -0600 |
commit | 45d89326b8bf9cd8eb398a87a8e572630d911f97 (patch) | |
tree | 9496271b2f5d3d3595b49fea097c922fb98afb2b /libdino/src/service | |
parent | 7497f1f17b941c09f84e6e4c6a5979e9c9b79851 (diff) | |
download | dino-45d89326b8bf9cd8eb398a87a8e572630d911f97.tar.gz dino-45d89326b8bf9cd8eb398a87a8e572630d911f97.zip |
Fix TLS error notification wrongly appearing
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 }); |