aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2018-11-17 11:02:54 +0100
committerfiaxh <git@mx.ax.lt>2018-11-21 18:01:54 -0600
commit45d89326b8bf9cd8eb398a87a8e572630d911f97 (patch)
tree9496271b2f5d3d3595b49fea097c922fb98afb2b
parent7497f1f17b941c09f84e6e4c6a5979e9c9b79851 (diff)
downloaddino-45d89326b8bf9cd8eb398a87a8e572630d911f97.tar.gz
dino-45d89326b8bf9cd8eb398a87a8e572630d911f97.zip
Fix TLS error notification wrongly appearing
-rw-r--r--libdino/src/service/connection_manager.vala8
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 });