Clean up the while() loop in recv