redis: fix crash when using FQDN in URL

(cherry picked from commit 4cf5a169f27a452187a69c0ca1bda993962491df)