if (client == NULL) return; // aborted connection https://github.com/tuanpmt/esp_mqtt/blob/37cab7cd8a42d51dc9ca448a6eef447ce8ce5b3e/mqtt/mqtt.c#L528 as done in https://github.com/arduino-org/Esp-Link/blob/master/mqtt/mqtt.c