while loop, try to decode as more messages as possible.