MQTT problem (Client disconnect after a period of time)

Hello,
I am using Mbed OS for my project and I am using MQTT but I see that client.yield not working after some time.
Thanks in advance.