[write standby] force DB connections to use unix socket to connect (#14524) (#14773)

This commit is contained in:
mssonicbld 2023-04-24 01:49:42 +08:00 committed by GitHub
parent 727afb593d
commit e0ef5b9808
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,7 +37,7 @@ class MuxStateWriter(object):
Initializes the connector during the first call
"""
if self.config_db_connector is None:
self.config_db_connector = ConfigDBConnector()
self.config_db_connector = ConfigDBConnector(use_unix_socket_path=True)
self.config_db_connector.connect()
return self.config_db_connector
@ -69,7 +69,7 @@ class MuxStateWriter(object):
Initializes the connector during the first call
"""
if self.asic_db_connector is None:
self.asic_db_connector = SonicV2Connector()
self.asic_db_connector = SonicV2Connector(use_unix_socket_path=True)
self.asic_db_connector.connect('ASIC_DB')
return self.asic_db_connector