This was an issue for me. After 20+ years with a chronic complainer, I coped by giving advice. My subconscious strategy was that the person would either take the advice so they wouldn't have the problem to complain about OR they wouldn't want to hear advice so they wouldn't complain to me.
At that time in my life I had zero patience for people wanting to "vent". I considered it a waste of energy. If they weren't willing to do something about the problem, I didn't want to hear about it. I didn't care if they took my advice, just that they took SOME step.
I wrote about this in "Inviting Unwanted Advice".