Nodemcu stops sending the messages to the API
Remove the return in setup function and check. And set regular yield () statements to ensure smooth running of background tasks. And use if statement in the loop for !client.connected()