I enjoy a sea softener to be precise breeding fruit flies / gnats. Any answers for getting rid of the problem? The water softener is contained by a closet and seems to...

The water softener is contained by a closet and seems to be breeding them close to crazy. I have tried every "gnat" and "flying insect" spray on the marketplace. Nothing seems to work. I can't exceedingly well acquire rid of my softener but does anyone know of something I can do to fix the problem?
Answers:    The water softener shouldnt breed insects.
I would look around the element, It comes to mind that if there is some rotting/dryrot close to it that would be a better answer