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

GithubReleasesUpdateInformation::buildUrl is writing to the console #205

Open
Diyou opened this issue Jul 29, 2022 · 2 comments
Open

GithubReleasesUpdateInformation::buildUrl is writing to the console #205

Diyou opened this issue Jul 29, 2022 · 2 comments

Comments

@Diyou
Copy link
Contributor

Diyou commented Jul 29, 2022

I'm working on a C# (#203) port of the Updater class which handles different log levels.
This part of the code writes directly to the console which it probably should not.

https://github.com/AppImage/AppImageUpdate/blob/2708f91c9ba86eefbc3f13e666cc3356ab9a21a9/src/updateinformation/GithubReleasesZsyncUpdateInformation.h#L42

@TheAssassin
Copy link
Member

Clearly committed by accident. Could you send a PR, please?

@Diyou
Copy link
Contributor Author

Diyou commented Jul 29, 2022

This actually made me aware of the behaviour that checking for updates will fetch the update information twice which might lead to a temporary timeout from the api (happened to me a few times already):
https://github.com/AppImage/AppImageUpdate/blob/2708f91c9ba86eefbc3f13e666cc3356ab9a21a9/src/updater.cpp#L178-L206

 // validate AppImage 
         try { 
             validateAppImage();  // <-- first time
try {
                auto updateInformationPtr = makeUpdateInformation(rawUpdateInformation);
                const auto zsyncUrl = updateInformationPtr->buildUrl(makeIssueStatusMessageCallback()); // <-- second time

Would it be feasible to set zsyncUrl in the constructor ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants