Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Context timeout not handled in FGetObject #1413

Closed
alexcocia opened this issue Nov 23, 2020 · 1 comment
Closed

Context timeout not handled in FGetObject #1413

alexcocia opened this issue Nov 23, 2020 · 1 comment
Labels

Comments

@alexcocia
Copy link
Contributor

When setting a context timeout of x duration, the request made to FGetObject always lasts 30 secs. Context is not returned until that time is passed

The following code returns the error after 30 secs:

        scalityContext, cancel := context.WithTimeout(context.Background(), 5 * time.Second)
	defer cancel()

	err := scality.client.FGetObject(scalityContext, bucket, itemName, filePath, minio.GetObjectOptions{})
	if err != nil {
		return errorhandler.CreateInternalError(fmt.Sprintf("Error in Scality getting item: [%s] bucket: [%s]", itemName, bucket), err)
	}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants