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

ReleaseAssetUpload Timeout doesn't work #1069

Closed
onatbas opened this issue Jan 29, 2016 · 3 comments
Closed

ReleaseAssetUpload Timeout doesn't work #1069

onatbas opened this issue Jan 29, 2016 · 3 comments
Labels
Status: Stale Used by stalebot to clean house Type: Bug Something isn't working as documented

Comments

@onatbas
Copy link

onatbas commented Jan 29, 2016

Hi.

I'm trying to increase the timeout of my ReleaseAssetUpload object like this:

var assetUpload = new ReleaseAssetUpload(
                    trimmed_filename,
                    content_type,
                    archiveContents, 
                    new TimeSpan(1,30,0)
                );
                // Upload the file to release.
                var asset = client.Release.UploadAsset(result, assetUpload).Result;

Afaik this means one and a half hours of timeout. Hoewever this doesn't work and my connection is disconnected after a couple of minutes, resulting in:

Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at System.Threading.Tasks.Task`1.get_Result()
   at GithubReleaser.Program.Main(String[] args) in d:\workspace\GithubReleaseCMD\GithubReleaseCMD\Program.cs:line 121

Any idea?

@naveensrinivasan
Copy link

This is an issue #963 . Here is a workaround fsprojects/FAKE#1048

@onatbas
Copy link
Author

onatbas commented Jan 30, 2016

Thank you @naveensrinivasan for pointing me in the right direction. I just needed a quick commandline tool so what I did is that I just added a timeout to the default Http client in the HttpClientAdapter here. I know It's ugly (I had to turn off Code Analysis for that !) but it works for me.

https://github.com/octokit/octokit.net/blob/master/Octokit/Http/HttpClientAdapter.cs

Thanks.

@github-actions
Copy link

👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!

@github-actions github-actions bot added the Stale label Jul 15, 2022
@nickfloyd nickfloyd added Type: Bug Something isn't working as documented Status: Stale Used by stalebot to clean house and removed category: bug labels Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale Used by stalebot to clean house Type: Bug Something isn't working as documented
Projects
None yet
Development

No branches or pull requests

4 participants