Project

General

Profile

Actions

Bug #4598

open

SAT>IP: RTP-over-TCP reset the tuner when data is discarded

Added by Mono Polimorph over 7 years ago. Updated over 6 years ago.

Status:
New
Priority:
Normal
Category:
SAT>IP
Target version:
-
Start date:
2017-09-15
Due date:
% Done:

0%

Estimated time:
Found in version:
last commit
Affected Versions:

Description

Hi,

With the current (and working) support for RTP-over-TCP still exists a problem. When the TCP socket is saturated and the write function fails, the data is discarded.. and this is correct. However, sometimes the connection will be closed by the client.

See this part of the log:

2017-09-15 16:19:03.239 satip: SAT>IP DVB-S Tuner #1 (192.168.1.22) - RTSP error -90 (Message too long) [5-0]
2017-09-15 16:19:03.721 subscription: 0009: service instance is bad, reason: Tuning failed

This is the log in the CLIENT side. The server is discarding data, but the client think that the "message" is too long.
I think that the correct behaviour in this case should be:

- If the write fails with TS data (188*N bytes) then discard data in chunks of aligned 188 bytes (no more, no less).
- If the write fails with RTCP data (small chunks of bytes), then retry the write one time or discard the complete message.
- If the write fails with RTSP data (high priority data), then retry the write.
- And only if the same write fails for some time, then close the socket.

The current code that discards the data is in the function http_extra_send_prealloc()@http.c:
http://github.com/tvheadend/tvheadend/blob/3391e1d99d2d9832fa165f01cdd5b0c44444319e/src/http.c#L901

You agree that this is a good strategy?
Regards.

Actions

Also available in: Atom PDF