Sorry if this wasn't clear: the reason that SO_REUSEADDR
exists (and it's APR cousin) is to remove this
problem, and allow for the tcp/ip stack to
reuse it. So the fact that you're seeing this
is likely due to that option isn't being sent.

I believe the patch is to adjust
TCN_IMPLEMENT_CALL(jint, Socket, bind) in network.c
and add apr_socket_opt_set(s->sock, APR_SO_REUSEADDR, 1)
right before the apr_socket_bind call...

On Feb 21, 2006, at 7:05 PM, Sean Neeley wrote:

I would be happy to test a version of APR with different socket options.
Thanks.

- Sean

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Garrett
Rooney
Sent: Tuesday, February 21, 2006 5:54 PM
To: [EMAIL PROTECTED]
Cc: Sean Neeley; [email protected]
Subject: Re: APR leaves port bound when terminated?

On 2/21/06, Jim Jagielski <[EMAIL PROTECTED]> wrote:
I would guess this in an artifact of SO_REUSEADDR

Actually, wouldn't setting SO_REUSEADDR (or APR_SO_REUSEADDR in this
case) make the problem go away?  I'd assumed that the code in Tomcat
just wasn't doing that or something.

-garrett


Reply via email to