mirror of
https://github.com/go-gitea/gitea.git
synced 2026-11-26 10:47:04 -06:00
On old vendor kernels like Synology's 3.10, `splice()` from a TCP socket fails with `EBADF` instead of `EINVAL`, so Go doesn't fall back to a normal copy and the git proxy's CONNECT relay dies at once, breaking every HTTPS clone, mirror and migration. The relay and the `git://` tunnel now retry with a plain copy when splice fails with `EBADF` before anything was written, so normal kernels keep using splice. Fixes: https://github.com/go-gitea/gitea/issues/40367 Assisted-by: Claude Code:claude-opus-5-5 --------- Signed-off-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: TheFox0x7 <thefox0x7@gmail.com>