Skip to content

bes/network-switch-hang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Download hangs forever after network switch

This repository started out as a question: Why does a reqwest download stall forever when switching between WiFi / Cellular networks on macOS or iOS?

Which prompted this thread on URLO and this StackOverflow question, and this discussion on the reqwest GitHub Discussions forum.

The reason it stalls is that the underlying network stack simply really wants the TCP connection to succeed, and doesn't throw any errors.

I have mitigated the problem in this repostory by using an AsyncRead wrapper that I found on StackOverflow and modified it to return a Polling error when a certain timeout has been reached.

About

reqwest / tokio network switch hang

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages