correctly handle memcached reconnection