client: disconnect before connect if already connected