+ // Mando a terminar todas las conexiones.
+ connections_mutex.lock();
+ for (ConnectionList::iterator con = connections.begin();
+ con != connections.end(); con++) {
+ (*con)->finish();
+ }
+ ConnectionList::size_type count = connections.size();
+ connections_mutex.unlock();
+ // Espero que terminen realmente.
+ while (count) {
+ Glib::usleep(10000); // 10 milisegundos
+ connections_mutex.lock();
+ count = connections.size();
+ connections_mutex.unlock();
+ }