fix duplicate connection in client on reconnect