W3C home > Mailing lists > Public > www-lib@w3.org > April to June 1999

EPIPE in HTWriter

From: olga <olga@goliath.eai.com>
Date: Fri, 21 May 1999 13:32:44 -0500 (CDT)
Message-ID: <XFMail.990521133244.olga@eai.com>
To: www-lib@w3.org
Hi,

I wonder why the handling of EPIPE  in HTWriter.c HTWriter_write (..) is
different from one in HTReader_read. 
In HTWriter:

-----------------------            
#ifdef EPIPE
                host->broken_pipe = YES;
                HTRequest_addSystemError(net->request, ERR_FATAL, socerrno, NO,
                                         "NETWRITE");
                return HT_ERROR;
                    
------------------------

Error code -902 is returned and nothing can be loaded from the same host
during the same program session.

I have changed the code to similar to a code in HTReader.c:  

-------------------------

                HTHost_unregister(host, net, HTEvent_WRITE);
                HTHost_register(host, net, HTEvent_CLOSE);
                return HT_CLOSED;

-------------------------

This causes the library to try to reconnect to a server and the request is
processed successfully.

Are there any problems with such code change?

Thanks,

Olga Antropova.
Received on Friday, 21 May 1999 14:34:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:29 GMT