I have write a program to download file from cloud. I find if the network 
is closed or reconnect, it will return error in windows. But if in linux, 
it won't get error, just download all the time.

And I don't want to set http.Client timeout, because the net speed may 
slow, i don't know a appropriate time set. 

I want the download will stop when internet is close or the remote connect 
is closed,just it work likes in windows.

Here is my code: https://play.golang.org/p/AuuQSJ2hgul

To recurrent it, you may start this network first(setting the speed in 
route if the file is small). After http connect and begin io.Copy,  
disconnect the internet. You may see the client will work all the time 
until you stop this program whether the internet is reconnect after one 
minute or not


-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/6124c933-2f22-4e02-8b43-3577a799b329%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to