def _reset_connection_attributes(self):
        """ Reset connection attributes. """
        self.connection = None
        self.encoding = None
        self._autojoin_channels = []
        self._reconnect_attempts = 0
Reset connection attributes.