apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: Using APR with tomcat leaves port 8009 bound when tomcat is terminated?
Date Fri, 24 Feb 2006 21:45:13 GMT

Why doesn't this become an apr_sockattr element to the apr_socket_create
or apr_socket_bind call, so that APR determines the before/after thingy?

One side note, you setopt *after* the bind if you want to know you are
the absolute owner of the socket.  you setopt *before* the bind on win32
if you know your app owns the socket and now you want to add additional
listeners (processes) to pay attention to it.  Dunno how we could map this
all that cleanly.


William A. Rowe, Jr. wrote:
> Jim Jagielski wrote:
>> On Feb 23, 2006, at 11:53 AM, Remy Maucherat wrote:
>>> Jim Jagielski wrote:
>>>> I agree that the change is a big benefit, and for
>>>> most OSs we care about, SO_REUSEADDR is available.
>>>> The APR call should gracefully fail...
>>>> I'll plug this in later on today after some edge-case tests.
>>> In AprEndpoint, there are a lot of Socket.optSet(serverSock,  
>>> Socket.APR_SO_REUSEADDR, 1);
>> Yes, the only rub is that for reasons I'm trying to remind myself
>> why, we do the setting before the bind under non-Windows, and
>> afterwards on Windows...
> If you SO_REUSEADDR before on win32, you will share any existing port
> that's previously opened by any other application.  Not cool :)
> Bill
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
> .

View raw message