Join peers in create

This commit is contained in:
Michael Crosby 2018-09-14 16:46:26 -04:00
parent a1a8f3fa5a
commit a3a374ab2f

View file

@ -40,6 +40,11 @@ func NewAgent(cfg *Config) (*Agent, error) {
if err != nil {
return nil, err
}
if len(cfg.Peers) > 0 {
if _, err := ml.Join(cfg.Peers); err != nil {
return nil, err
}
}
return &Agent{
config: cfg,
members: ml,