[MQTT] Simplifying the code.

Authored by fkristof on Oct 28 2018, 8:31 PM.