diff --git a/src/sonic_ax_impl/mibs/__init__.py b/src/sonic_ax_impl/mibs/__init__.py index 612d580f9..c431de937 100644 --- a/src/sonic_ax_impl/mibs/__init__.py +++ b/src/sonic_ax_impl/mibs/__init__.py @@ -211,6 +211,8 @@ def split_sai_id_key(sai_id_key): def config(**kwargs): global redis_kwargs redis_kwargs = {k:v for (k,v) in kwargs.items() if k in ['unix_socket_path', 'host', 'port']} + if 'unix_socket_path' in redis_kwargs and 'host' in redis_kwargs and 'port' in redis_kwargs: + redis_kwargs['use_unix_socket_path'] = True redis_kwargs['decode_responses'] = True def init_db():