I had a crazy number of fruit flies in my basement a couple years back. They had taken up residence in the floor drain beside my deep sink. I ended up have to soak the drain, grate and exposed inside pipe with "Home Defense" stuff 2 or 3 times to kill all the little buggers.
I haven't had another bout with them since. I did learn to be more vigilant with that drain though.
For pesky drain flies, you need an active source solution like live bacteria that will eat through food matter/sugar deposits left by spilt wort, etc. Check it out here:http://www.amazon.com/Bio-clean-Drain-Septic-Bacteria-lb/dp/B001N09KN4/ref=sr_1_1?ie=UTF8&qid=1411656990&sr=8-1&keywords=bio+clean
I have not used this specific product, but live bacteria was the only thing that would get rid of drain flies in the restaurants I have worked in: if the drain has any food residue, they will nest and breed in it and never go away