[tbnl-devel] Odd behavior (socket leak)
pete-tbnl-dev at kazmier.com
pete-tbnl-dev at kazmier.com
Fri Jul 16 14:36:02 UTC 2004
On Fri, Jul 16, 2004 at 12:37:49PM +0200, edi at miles wrote:
> I'm sitting in a train and trying to send this via my cell
> phone. Let's see if it works... :)
Nice :-)
> I've looked at the source code of mod_lisp.c (version 2.33) and Apache
> (1.3.29) and I'm beginning to ask myself whether the "Keep-Socket"
> option makes any sense at all. What I see with my limited knowledge of
> Apache is the following:
You missed one key part of the process.
> 2. To get a socket, lisp-handler calls OpenLispSocket.
>
> 3. OpenLispSocket uses ap_psocket (using the global variable
> SocketPool) to get a socket from Apache.
OpenLispSocket only fetches a new socket if and only if one has not
already established and is safe to use (see here):
if (cfg->LispSocket) if (cfg->UnsafeLispSocket)
{ ap_pclosesocket(SocketPool, cfg->LispSocket);
cfg->LispSocket = 0;
cfg->UnsafeLispSocket = 0;
}
else
{
return cfg->LispSocket;
}
This is the step that bypasses the creation of a new socket. Thus,
Keep-Socket does make sense. I'll continue looking at the TBNL and
mod_Lisp interaction to see if I can find anything else.
Thanks,
Pete
More information about the Tbnl-devel
mailing list