fix_: don't start mailserver cycle when no mailservers set (#4457)
This commit is contained in:
parent
45bd8c16da
commit
0818c98fca
|
@ -72,7 +72,7 @@ func (m *Messenger) StartMailserverCycle(mailservers []mailservers.Mailserver) e
|
|||
switch version {
|
||||
case 1:
|
||||
if m.server == nil {
|
||||
m.logger.Warn("not starting mailserver cycle")
|
||||
m.logger.Warn("not starting mailserver cycle: no p2p server is set")
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -81,6 +81,10 @@ func (m *Messenger) StartMailserverCycle(mailservers []mailservers.Mailserver) e
|
|||
go m.updateWakuV1PeerStatus()
|
||||
|
||||
case 2:
|
||||
if len(mailservers) == 0 {
|
||||
m.logger.Warn("not starting mailserver cycle: empty mailservers list")
|
||||
return nil
|
||||
}
|
||||
for _, storenode := range mailservers {
|
||||
_, err := m.transport.AddStorePeer(storenode.Address)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue