Skip to content

Fix Hardcover sync timing after Wi-Fi restoration on Kobo Clara Color - #68

Open
RaffoNin wants to merge 5 commits into
Billiam:mainfrom
RaffoNin:feature/fix-auto-progress-
Open

RaffoNin wants to merge 5 commits into
Billiam:mainfrom
RaffoNin:feature/fix-auto-progress-

Conversation

@RaffoNin

@RaffoNin RaffoNin commented Aug 24, 2026 •

Copy link
Copy Markdown

Auto progress update with wifi on demand never worked on my Kobo. Adding the arbitrary 5 second delay allowed the request to actually go through for me.

Adds a 5-second delay after Wi-Fi connectivity is restored before starting the Hardcover API callback. This gives the Kobo network stack enough time to fully establish DHCP/network connectivity before making the API request.

@RaffoNin

RaffoNin commented Aug 24, 2026 •

Copy link
Copy Markdown
Author

I removed the arbitrary 5 second check and did a check every 5 seconds if DNS can be resolved with maximum of 6 attempts. If DNS is resolved before the 6th attempt, then the request is sent to Hardcover API.

@Billiam

Billiam commented Aug 26, 2026 •

Copy link
Copy Markdown
Owner

I haven't run into this issue. Is it something specific to your network?

I removed the arbitrary 5 second check and did a check every 5 seconds if DNS can be resolved

So in addition to not being able to make a request immediately after enabling wifi, you also have not been able to do so within the next 5 seconds or more?

@RaffoNin

Copy link
Copy Markdown
Author

There's been some queries about it online and it never worked on mine. I've also tested it on 4 different wifi networks to confirm. https://www.reddit.com/r/koreader/comments/1usnms0/hardcover_plugin_wifi_ondemand/

So in addition to not being able to make a request immediately after enabling wifi, you also have not been able to do so within the next 5 seconds or more?

I actually changed the implementation from checking after 5 seconds to checking every 1 second with maximum of 6 attempts. On the network i've tested it usually resolves the api dns on the second attempt.

I personally don't know if this is an issue with koreader's implementation of wifi on demand for Kobo devices or if its the plugin. But adding the changes made it work for me. Im still testing it right now on my device with notifications whenever the check is initialized but its been stable so far.

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

Successfully merging this pull request may close these issues.

2 participants