[Live-devel] When streaming RTP over TCP, Live555 Proxy Server sometimes does not reconnect to 'back end' device

Erik Montnemery erik at montnemery.com
Mon Jan 30 11:40:37 PST 2017


> I have now installed a new version (2017.01.26) of the “LIVE555 Streaming
> Media” code that incorporates your patch (mostly).
Thanks a lot Ross, this is great!

I've found one more more similar issue, the new one is triggered by the
following sequence:
- Connection to back-end server is torn down
- The torn down connection triggers a read error which causes the socket to
  be closed
- If a client to the proxy at this point issues PLAY, the closed socket will
  still be referenced, causing this error:
  BasicTaskScheduler::SingleStep(): select() fails: Bad file descriptor

  I've tried to solve this by overloading handleAlternativeRequestByte1 in
  ProxyRTSPClient, making it call fOurServerMediaSession.closeClientSessions()
  if requestByte is set to 0xff. I'm currently testing this change.

  Would it be better to instead handle this by (instead) overloading
  OnDemandServerMediaSubsession::startStream in ProxyServerMediaSubsession
  and do some sanity checks in the overloaded function?

Note: There is a bug in the debug code in BasicTaskScheduler::SingleStep()
causing an out-of-bounds read. I've attached a patch which corrects the bug
and also tries to make the debug prints slightly more useful by printing
the return value of fcntl(fd, F_GETFD) which will return -1 if a closed
file descripter is referenced.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: badfdprint.patch
Type: application/octet-stream
Size: 1237 bytes
Desc: not available
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20170130/84d4f681/attachment.obj>


More information about the live-devel mailing list