fix bug: a broken http connection will cause io.Copy() stuck and file’s offset will not be updated