Date: Wed, 9 Mar 2011 01:53:13 +0100 From: Steffen Beyer <steffenbeyer@windit.de> To: freebsd-python@freebsd.org Subject: socket.settimeout breaks HTTP server Message-ID: <20110309015313891650.33a231fb@windit.de>
next in thread | raw e-mail | index | archive | help
Hi, after some debugging of a WebDAV server (trytond), dropping connections shortly after accepting them, I found the issue: class BaseThreadedHTTPServer(SocketServer.ThreadingMixIn, BaseHTTPServer.HTTPServer): def server_bind(self): # Python < 2.6 doesn't handle self.timeout self.socket.settimeout(1) (http://hg2.tryton.org/trytond/file/28c6cc9fe39f/trytond/protocols/webdav.py#l83) It runs fine after removing the call to "settimeout". The value does not seem to make a difference. I guess, this works for other OSs as the software is in production. It fails however in a FreeBSD 8.1 jail. What's the cause of the problem? How can I fix it without breaking it for other people? Kind regards, -- Steffen Beyer WINDIT GmbH Holtenauer Str. 57 24105 Kiel Fon: +49 (0)431 556 8342-0 Fax: +49 (0)431 556 8342-9 Web: http://www.windit.de
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110309015313891650.33a231fb>