Mercurial > p > roundup > code
comparison roundup/cgi/client.py @ 3807:c27aafab067d
Band-aid over handling of netework errors.
On a busy tracker (on Linux 2.6.8) we will get "error instance has no
attribute 'errno'" several times a day (less often I'm getting "timeout
instance has no attribute 'errno'"). This fixes the immediate error.
However this seems to have masked a "Connection reset by peer" error
that is not yet fixed with this patch. See also [SF#1600727]
sf.net/tracker/index.php?func=detail&aid=1600727&group_id=31577&atid=402788
| author | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
|---|---|
| date | Mon, 15 Jan 2007 21:10:26 +0000 |
| parents | 75d3896929bb |
| children | 36eb9e8faf30 |
comparison
equal
deleted
inserted
replaced
| 3806:a16239e37598 | 3807:c27aafab067d |
|---|---|
| 1 # $Id: client.py,v 1.231 2006-12-29 08:00:21 richard Exp $ | 1 # $Id: client.py,v 1.232 2007-01-15 21:10:26 schlatterbeck Exp $ |
| 2 | 2 |
| 3 """WWW request handler (also used in the stand-alone server). | 3 """WWW request handler (also used in the stand-alone server). |
| 4 """ | 4 """ |
| 5 __docformat__ = 'restructuredtext' | 5 __docformat__ = 'restructuredtext' |
| 6 | 6 |
| 845 | 845 |
| 846 """ | 846 """ |
| 847 try: | 847 try: |
| 848 call(*args, **kwargs) | 848 call(*args, **kwargs) |
| 849 except socket.error, err: | 849 except socket.error, err: |
| 850 if err.errno not in self.IGNORE_NET_ERRORS: | 850 err_errno = getattr (err, 'errno', None) |
| 851 if err_errno not in self.IGNORE_NET_ERRORS: | |
| 851 raise | 852 raise |
| 852 | 853 |
| 853 def write(self, content): | 854 def write(self, content): |
| 854 if not self.headers_done: | 855 if not self.headers_done: |
| 855 self.header() | 856 self.header() |
