[jdev] Bug in jabberd2 (2.1.13) on win32

Dan Hulme dhulme at gmail.com
Thu Jan 24 13:25:03 CST 2008


I had forgotten, but this is the case.  Here is confirmation:

http://msdn2.microsoft.com/en-us/library/ms740481(VS.85).aspx
> An application should not rely on being able to reuse a socket after it has been shut down.
> In particular, a Windows Sockets provider is not required to support the use of
> 'connect' on a socket that has been shut down.

So the win32 implementation should not be pooling sockets, I guess.

-Dan

On Jan 24, 2008 12:51 AM, Norman Rasmussen <norman at rasmussen.co.za> wrote:
> On Jan 24, 2008 2:14 AM, Dan Hulme <dhulme at gmail.com> wrote:
>
> > This function appears to try to append the old closed socket to a
> > linked list of free sockets.  When the new connection tries to use
> > this socket, it has trouble.  Once the next connection connects,
> > however, it will not use that socket as it is still in use, so it will
> > work.  Not sure why the socket that is being appended is broken, but
> > if this function is not called (at mio_impl.h: 267), the program works
> > "fine."  It may not be reusing sockets, but everything else works.
> >
>
> In my experience win32 does weird things with closed sockets: if you close a
> listening socket, it doesn't actually go away until all connected clients do
> too.  It sounds like this is similar, and that perhaps for win32 you
> shouldn't be trying to pool sockets.
>
> --
> - Norman Rasmussen
>  - Email: norman at rasmussen.co.za
>  - Home page: http://norman.rasmussen.co.za/



More information about the JDev mailing list