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

SyncManager incorrect error reporting #23

Open
matejm opened this issue May 21, 2017 · 4 comments
Open

SyncManager incorrect error reporting #23

matejm opened this issue May 21, 2017 · 4 comments
Assignees
Labels

Comments

@matejm
Copy link
Contributor

matejm commented May 21, 2017

If there is no network and I try to sync wallet, I get connection error, which is correct. But if I connect my computer to the internet and sync again, same error is reported (sync manager probably doesn't check for network again).
Same problem happens if there is network connection and I sync my wallet. After I disconnect my computer and try to sync again I get Wallet downloading dialog. If cancel button is pressed, Online wallet is corrupted message is displayed, which is also incorrect.

@matejm matejm added the bug label May 21, 2017
@matejm matejm added this to the 0.1 alpha milestone May 21, 2017
@viddrobnic
Copy link
Member

QNetworkAccessManager::networkAccessible sometimes returns that network is accessible, even though it is not. It has been partially fixed in c843cc9 by checking QNetworkReply::error and emitting NETWORK_ERROR signal when error is not 0.

In specific occasions that are quite common, QNetworkReply never finishes and therefore I can't check the error. To fix this, there should be a network timeout.

@viddrobnic viddrobnic removed this from the 0.1 alpha milestone May 21, 2017
@matejm
Copy link
Contributor Author

matejm commented Nov 12, 2017

Tested this again.

If there is no network and ...

This is not a problem anymore.

Same problem happens ...

If network is disconnected and sync is started, then nothing is reported. You can stare into repeating animation for an infinite amount of time. If cancelled, nothing happens as is should. Also when syncing again, Network server is unreachable error is reported.

As @DzinVision said, solution could be network timeout.

@matejm
Copy link
Contributor Author

matejm commented Nov 12, 2017

It seems that this is an official Qt bug.

I think this issue could be closed as we are not going to implement network timeout by ourselves.

@zigapk
Copy link
Member

zigapk commented Nov 12, 2017

As the issue suggests, we can implement our own timeout that destroys the socket after some time. Thoughts?

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

3 participants