Light bulb sockets in ceiling fan damaged due to corrosion or arcing: Can clean to repair or must replace?
Sockets of that type are readily available as lamp components, sold by competent hardware stores and lighting supply stores.
Don't continue running it - that's a mistake given that you know it's defective.  Swap the socket for a good one.
Most likely the entire luminaire is an accessory that attaches to the fan hub, so it could come off and be serviced on a bench, or taken in to a lighting supply to be repaired.   Note the ventilation holes at the top of the bulb housing; use them to see inside, or if necessary send down a screwdriver.  Don't be surprised if the socket is screwed down onto a &quot;hickey&quot; (threaded hollow tube about 1/2&quot; diameter, common in lamp construction).
If the bulb is getting excessively hot, it may be a cheap foreign job, or it may be an obsolete type called an &quot;incandescent&quot; which is basically an electric campfire that also makes some light.  Getting modern bulbs should take care of that.