No, i would certainly not. But the chance of tvheadend failing in spooling the 4 size bytes is low. It would be more obvious, if the stream has broken pipe or something like this, which does not hang, but returns immedeately.

But we can set the second timeout to user timeout, as in the data read call. I believe, setting it to 5 ms again will fail again, because Raspi ist doing some housekeeping here, whatever it is, therefor is said: "Timeout unpredictable but response for sure" => 0.

The bigger issue would be, to inspect the remaining tcp platforms for the same issue and other PVR.XXX modules how they react on the TcpSocketRead modification.