diff options
-rw-r--r-- | frontend_svr.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/frontend_svr.c b/frontend_svr.c index ac794986..f316c8e7 100644 --- a/frontend_svr.c +++ b/frontend_svr.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend_svr.c,v 1.80 2009-08-18 12:52:18 phintuka Exp $ + * $Id: frontend_svr.c,v 1.81 2009-09-09 12:38:12 phintuka Exp $ * */ @@ -1674,8 +1674,12 @@ void cXinelibServer::Handle_ClientConnected(int fd) if (fcntl (fd, F_SETFL, fcntl (fd, F_GETFL) | O_NONBLOCK) == -1) { LOGERR("Error setting control socket to nonblocking mode"); CLOSESOCKET(fd); + return; } + int alive = 1; + setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &alive, sizeof(alive)); + CloseDataConnection(cli); m_OsdTimeouts[cli] = 0; |