First is a simple fix, Close() not called if message length is not read due to error
Second allows the demuxer to reconnect following the server connection dropping out.
[pvr.hts] Ensure connection is closed on failure to read packet size
I looked at issue #6 at the weekend and did some debugging - I think the second fix will resolve this issue, I will test this evening, I get it alot on my wireless when watching live tv on my laptop.
Tested - this seems to fix issue #6
[pvr.hts] fix problem with demuxer reconnect.
This does not fix issue https://github.com/opdenkamp/xbmc-pvr-addons/issues/6 for me, I'm still getting the channel freezes.
it think you better return NULL if the connection dropped, so demux stops