From 717606a54dee2367cc3aa8c4cee19b0e62c442c5 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Wed, 26 Feb 2020 23:01:34 +0100 Subject: Fix maintenance of connected status --- connector/irc/irc.go | 1 + connector/xmpp/xmpp.go | 1 + 2 files changed, 2 insertions(+) (limited to 'connector') diff --git a/connector/irc/irc.go b/connector/irc/irc.go index d69884e..977b71d 100644 --- a/connector/irc/irc.go +++ b/connector/irc/irc.go @@ -251,6 +251,7 @@ func (irc *IRC) Send(event *Event) error { func (irc *IRC) Close() { conn := irc.conn irc.conn = nil + irc.connected = false if conn != nil { conn.Close() } diff --git a/connector/xmpp/xmpp.go b/connector/xmpp/xmpp.go index f1a75b2..4af016c 100644 --- a/connector/xmpp/xmpp.go +++ b/connector/xmpp/xmpp.go @@ -351,4 +351,5 @@ func (xm *XMPP) Close() { } xm.conn = nil xm.connectorLoopNum += 1 + xm.connected = false } -- cgit v1.2.3