From patchwork Thu Jul 20 10:03:09 2006 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Schmirler X-Patchwork-Id: 12361 Received: from mail.linogate.de ([213.179.141.2]) by www.linuxtv.org with esmtp (Exim 4.50) id 1G3VNB-0005Jl-Bw for vdr@linuxtv.org; Thu, 20 Jul 2006 12:03:13 +0200 Received: from localhost (localhost [127.0.0.1]) by mail.linogate.de with ESMTP id k6KA39VK002191 for ; Thu, 20 Jul 2006 12:03:09 +0200 From: "Frank Schmirler" To: VDR Mailing List Subject: Re: [vdr] SVDRP ignores EOF (clientside close) Date: Thu, 20 Jul 2006 12:03:09 +0200 Message-Id: <20060720100309.M33662@schmirler.de> In-Reply-To: <20060719105936.M58607@schmirler.de> References: <20060719105936.M58607@schmirler.de> X-Mailer: Open WebMail X-OriginatingIP: 213.179.141.1 (schmirl@linogate.de) MIME-Version: 1.0 X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jul 2006 10:03:13 -0000 Status: O X-Status: X-Keywords: X-UID: 10150 On Wed, 19 Jul 2006 12:59:36 +0200, Frank Schmirler wrote > I would like to raise an issue with SVDRP. When the client doesn't > send QUIT but simply closes the connection, VDR happily ignores the > EOF returned by read. The socket will remain in state CLOSE_WAIT > until it's finally closed due to the SVDRP timeout. In the meantime > the SVDRP port remains blocked for other clients. An update on this issue: with the implementation used before vdr-1.2.2 you *will* get a broken pipe message, as cSVDRP::Close() tries to send a goodby message to the client. This is not a problem, but as a "clean" solution I would suggest: isyslog("timeout on SVDRP connection"); Cheers, Frank --- svdrp.c.orig 2006-07-20 11:34:10.000000000 +0200 +++ svdrp.c 2006-07-20 11:39:51.000000000 +0200 @@ -1575,8 +1575,11 @@ isyslog("lost connection to SVDRP client"); Close(); } - else - break; + else { + isyslog("SVDRP client closed connection"); + file.Close(); + DELETENULL(PUTEhandler); + } } if (Setup.SVDRPTimeout && time(NULL) - lastActivity > Setup.SVDRP Timeout) {