Change client packet listener to a do-while loop.