]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
fix: Support Redis URL without host
authorJoel Rosdahl <joel@rosdahl.net>
Fri, 13 May 2022 18:46:20 +0000 (20:46 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 14 May 2022 18:41:32 +0000 (20:41 +0200)
src/storage/secondary/RedisStorage.cpp

index a607d229d132d90c0d9b1e5118f71e07603434b7..32bc4ae393f75e363d41644675a117082dc112ba 100644 (file)
@@ -230,11 +230,11 @@ RedisStorageBackend::connect(const Url& url,
   ASSERT(url.path().empty() || url.path()[0] == '/');
 
   LOG("Redis connecting to {}:{} (connect timeout {} ms)",
-      url.host(),
+      host,
       port,
       connect_timeout);
-  m_context.reset(redisConnectWithTimeout(
-    url.host().c_str(), port, to_timeval(connect_timeout)));
+  m_context.reset(
+    redisConnectWithTimeout(host.c_str(), port, to_timeval(connect_timeout)));
 
   if (!m_context) {
     throw Failed("Redis context construction error");