Arsen Chaloyan wrote:
Well, below is final at this time not so trivial issue still concerning Windows implementation only.

Description:
Interruptable pollset creation sporadically fails.

How to reproduce:
Call apr_pollset_create() in a loop, say 100 times, you will see that some of the attempts fail.

How to fix:
See static apr_status_t create_socket_pipe(SOCKET *rd, SOCKET *wr) in file_io/win32/pipe.c

The following assumption is not always true
        /* Listening socket is nonblocking by now.
         * The accept must create the socket
         * immediatelly because we connected already.
         */

I would say: The accept should create the socket, but still may fail.


Good point.

As far as listening socket is nonblocking, reasonable number of attempts of accept() call should be considered. Alternatively listening socket can be switched to blocking mode before accept() call.


Think I'll try the way how it should be done
(standard wait on WSAEWOULDBLOCK)


Regards
--
^(TM)

Reply via email to