Join peers in create
This commit is contained in:
parent
a1a8f3fa5a
commit
a3a374ab2f
1 changed files with 5 additions and 0 deletions
5
agent.go
5
agent.go
|
@ -40,6 +40,11 @@ func NewAgent(cfg *Config) (*Agent, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
if len(cfg.Peers) > 0 {
|
||||||
|
if _, err := ml.Join(cfg.Peers); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
return &Agent{
|
return &Agent{
|
||||||
config: cfg,
|
config: cfg,
|
||||||
members: ml,
|
members: ml,
|
||||||
|
|
Loading…
Reference in a new issue