42wim / matterbridge

bridge between mattermost, IRC, gitter, xmpp, slack, discord, telegram, rocketchat, twitch, ssh-chat, zulip, whatsapp, keybase, matrix, microsoft teams, nextcloud, mumble, vk and more with REST API (mattermost not required!)
Apache License 2.0
6.66k stars 618 forks source link

Clear existing IRC event handlers before connecting to new ones #2138

Closed bd808 closed 5 months ago

bd808 commented 6 months ago

Clear IRC event handlers that we will be registering for the new connection before registering new handlers. This prevents duplicate event handlers in the case where we are connecting via a BNC and are seeing a reconnect. Attempting to clear handlers when none have been set is a no-op.

Fixes 42wim#1564 Co-authored-by: Andreas Vögele andreas@andreasvoegele.com

codeclimate[bot] commented 6 months ago

Code Climate has analyzed commit 59a09e14 and detected 0 issues on this pull request.

View more on Code Climate.

42wim commented 5 months ago

LGTM, thanks!