diff options
author | Ruediger Pluem <rpluem@apache.org> | 2023-05-03 07:47:15 +0000 |
---|---|---|
committer | Ruediger Pluem <rpluem@apache.org> | 2023-05-03 07:47:15 +0000 |
commit | 4b0778590349e2ff2b07073615f1b82ad83d35de (patch) | |
tree | 078f1c5994a5c8410ebbe85828e0f6b7fd74be00 /xml/apr_xml_libxml2.c | |
parent | 572ffea6a5b1aae06333385cbbec0069c6140ba2 (diff) | |
download | apr-4b0778590349e2ff2b07073615f1b82ad83d35de.tar.gz |
Check sockets from connection pool before using them and try to reconnect
them if they are not usable any longer.
* memcache/apr_memcache.c::ms_find_conn:
Check if the socket returned from the connection pool is still readable. If
not then invalidate the connection in the pool and request a new one
from the connection pool. Repeat this until a valid socket is returned
or this was done the maximum number of connections in the pool plus one.
This ensures that at least one new socket was created. If a new socket
does not work this indicates a broken backend and not just a restart in
the past. In this case return an error like previously.
* test/testmemcache.c:
Add new test for connection validation.
* test/memcachedmock.c:
For the new test we need a memcached mock server that we control and
can restart.
* test/testmemcache.h:
Shared defines between test/testmemcache.c and test/memcachedmock.c.
* test/Makefile.in:
* test/Makefile.win:
* test/NWGNUmakefile:
* test/NWGNUmemcachedmock:
Needed changes to build test/memcachedmock.c on different platforms.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909585 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'xml/apr_xml_libxml2.c')
0 files changed, 0 insertions, 0 deletions