So Go's http library really sucks as far as timeouts... We can set timeouts for obvious things like TCP connection, TLS handshake and HTTP headers reception. But we can't have the body send/receive itself timeout in a sane way...
The only thing that Go seems to offer there is a non-resetable timeout, meaning that we have to guess ahead of time how long the client will take to download or upload the data as even if bytes are successfully sent or received, the timeout will not be reset and when it hits, will just close the connection. So it looks like we'll need to look into some kind of custom solution to this so we can have the connection timeout if it fails to receive data in the past 30s or so, resetting the timer whenever data is received. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1667590 Title: Improve http timeout handling in LXD To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/lxd/+bug/1667590/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
