I am not very familiar with the shutdown process yet (I did not try to use it anywhere), but the documentation seems to imply that what you expected to happen is what should happen. So if the download is being interrupted, I guess that is a bug.
On Fri, Mar 10, 2017 at 11:33 AM Andrew <angang....@gmail.com> wrote: > Suppose I have a new folder with two files, main.go(code from the link) > and myfile.iso(large file). > > After "go run main.go" from the console, open browser and type > "localhost:8080/myfile.iso" to download the file. > Back to the console and Ctrl+c to shut down the server when the file is > downloading. > > The server will stop immediately and the file downloading process failed. > > Is this the correct behavior of Server.Shutdown? > > I think the server should wait for the file downloading process to finish > or timeout after 5 seconds instead of terminate immediately, right? > > > -- > 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. > For more options, visit https://groups.google.com/d/optout. > -- 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. For more options, visit https://groups.google.com/d/optout.