Fixed a small bug associated with UDP length and return code form recv.