Skip to content
Snippets Groups Projects
Commit 050f2525 authored by ale's avatar ale
Browse files

Fix an error when io.CopyBuffer returns n=0

It could be that the "n=0 means EOF" semantics are leaking from the
underlying splice() system call? Anyway this prevents radiod from
getting stuck in a busy loop in certain(?) cases.
parent 828c8956
No related branches found
No related tags found
1 merge request!1v2.0
......@@ -175,6 +175,10 @@ func copyStream(tag string, out, in *net.TCPConn, promCounter prometheus.Counter
}
return
}
if n == 0 {
log.Printf("http: proxy got 0 bytes from splice()")
return
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment