In <URL:news:local.News> on Wed 03 Sep, [EMAIL PROTECTED] wrote:
> 
> --> Tuesday, September 2, 2003, 4:31:26 PM, [EMAIL PROTECTED] wrote:
> 
> > In <URL:news:local.News> on Tue 02 Sep, Ian Bicking wrote:
> 
> > I thought that 'StreamOut Error' is a message from mod_python which is just
> > printed to stderr. But then there's the post from Matt/Geoff suggesting this
> > is an OS problem.
> 
> If Webware doesn't have a timeout as Ian mentioned, then the 'Software cause
> connection abort' message being seen seems to make sense when Apache reaches
> its Timeout limit and kills the connection, at which point Webware is
> probably confused and Python is reporting the error.
> 
> Has either of you just tried setting the Apache Timeout directive very high?

The problem ist surely not timeout related as it immediately happens
after cancelling the transfer.


>From the sources of NewThreadedAppServer.py:


from WebKit.ASStreamOut import ASStreamOut
class TASASStreamOut(ASStreamOut):

        def __init__(self, sock):
                ASStreamOut.__init__(self)
                self._socket = sock

        def flush(self):
                debug=0
                result = ASStreamOut.flush(self)
                if result: ##a true return value means we can send
                        reslen = len(self._buffer)
                        sent = 0
                        while sent < reslen:
                                try:
                                        sent = sent + 
self._socket.send(self._buffer[sent:sent+8192])
                                except socket.error, e:
                                        if e[0]==errno.EPIPE: #broken pipe
                                                pass
                                        else:
                                                print "StreamOut Error: ", e
                                        break
                        self.pop(sent)


This just ignores the socket.error. I think it would be a good idea to give
the application a possibility to find out about the error state, e.g.
through setting an error flag or a return value.

I'm not sure about the errno.EPIPE, but if the pipe is broken, what sense
does it make to re-try sending more data?


Regards,

Dietmar






-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to