Jeep XJ Headlight wiring

As the days get shorter and I drive more in the dark, I have been noticing that my LED headlights have been flickering a bit lately.  Today they suddenly went out completely!

Luckily, the high beams still worked. I just got to annoy people on coming and in front of me as I made my way home.

The light switch and dimmer switch seemed to be making the correct clicking sounds so I decided to try the connections starting with the ones I could get to easily.

The first one I checked was the one where the grill harness meets the engine bay harness.  As I touched it the headlights came on so I hit the right one first try.

Pulling it apart, I could see lots of corrosion on the pins.  I used a brass brush and Deoxit cleaner to clean them up.  I then plugged and unplugged the connector a few times to clean the sockets.

The lights seem brighter again like they were when I first installed them.  Hopefully, they will stay on in the dark now.