close all connections before opening the connection menu