diff --git a/sonic_data_client/mixed_db_client.go b/sonic_data_client/mixed_db_client.go index 386a55a7..f63dc801 100644 --- a/sonic_data_client/mixed_db_client.go +++ b/sonic_data_client/mixed_db_client.go @@ -1151,11 +1151,10 @@ func (c *MixedDbClient) Capabilities() []gnmipb.ModelData { func (c *MixedDbClient) Close() error { for table, pt := range c.tableMap { - if strings.HasPrefix(table, DASH_TABLE_PREFIX) && c.zmqClient != nil { - log.V(2).Infof("Delete ZmqProducerStateTable: %s", table) - swsscommon.DeleteZmqProducerStateTable(pt.(swsscommon.ZmqProducerStateTable)) + zpt, ok := pt.(swsscommon.ZmqProducerStateTable) + if ok { + swsscommon.DeleteZmqProducerStateTable(zpt) } else { - log.V(2).Infof("Delete ProducerStateTable: %s", table) swsscommon.DeleteProducerStateTable(pt) } }