I am using mosquitto.hin pure C to connect to a MQTT broker. All fine so far for single threaded code.
mosquitto.h
But now I have threaded code and created a thread