13
0

avoid redundant IO port reconnections in Tracks runtime case

This commit is contained in:
Paul Davis 2015-05-09 14:46:40 -04:00
parent 49e292f360
commit 18415ba6cd

View File

@ -489,12 +489,14 @@ PortManager::reconnect_ports ()
{
boost::shared_ptr<Ports> p = ports.reader ();
/* re-establish connections */
DEBUG_TRACE (DEBUG::Ports, string_compose ("reconnect %1 ports\n", p->size()));
for (Ports::iterator i = p->begin(); i != p->end(); ++i) {
i->second->reconnect ();
if (!Profile->get_trx()) {
/* re-establish connections */
DEBUG_TRACE (DEBUG::Ports, string_compose ("reconnect %1 ports\n", p->size()));
for (Ports::iterator i = p->begin(); i != p->end(); ++i) {
i->second->reconnect ();
}
}
return 0;