Refactored mqttsn_poll_task