select() problem seen with vdr-plugin-streamdev 0.6.1
Commit Message
Hi,
I'm seeing this strange problem that a select statement in the streamdev
server is returning EBADF and then the streamdev server exits and refuse
to accept more connections. This typically happens when trying to stream
a specific channel. Trying to stream other channels does not exhibit
this problem.
I can recompile code and try patches.
I've made simple and crude patch to make the streamdev server plugin a
bit more fault tolerant. See attachment.
OS: FreeBSD-11-current
Driver: Wecamd (Same as what is in Linux 3.18)
BTW: Thank you for keeping VDR up to date!
--HPS
@@ -111,8 +111,10 @@
if (!Running())
break;
if (sel < 0) {
- esyslog("fatal error, server exiting: %m");
- break;
+ //esyslog("fatal error, server exiting: %m");
+ //break;
+ sel = 0;
+ usleep(100000);
}
/* Ask all Server components to act on signalled sockets */