Handle socket recv errors.