Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate client.Store.ID #484

Open
itzngga opened this issue Nov 1, 2023 · 0 comments
Open

Duplicate client.Store.ID #484

itzngga opened this issue Nov 1, 2023 · 0 comments

Comments

@itzngga
Copy link

itzngga commented Nov 1, 2023

If there 2 or more cloned device and has logged-in the Store.ID result same as first logged device object, eg:

package main

import (
	"fmt"
	"github.com/itzngga/Roxy/core"
	_ "github.com/itzngga/Roxy/examples/cmd"
	"github.com/itzngga/Roxy/options"
	_ "github.com/mattn/go-sqlite3"
	"log"

	"os"
	"os/signal"
	"syscall"
)

func main() {
	opt := options.NewDefaultOptions()
	app, err := core.NewGoRoxyBase(opt)
	if err != nil {
		log.Fatal(err)
	}
	
	// eg: 6281xxxxx
	fmt.Println(app.Store.ID)

	opt2 := options.NewDefaultOptions()
	app2, err := core.NewGoRoxyBase(opt)
	if err != nil {
		log.Fatal(err)
	}

	// it will same ID with app.Store.ID
	fmt.Println(app2.Store.ID)

	c := make(chan os.Signal)
	signal.Notify(c, os.Interrupt, syscall.SIGTERM)
	<-c
	app.Shutdown()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant