JoinServer errors should result in Error log
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Sarah Jamie Lewis 2021-10-31 12:16:50 -07:00
parent fbfef2d907
commit ead6a2698f
1 changed files with 5 additions and 4 deletions

View File

@ -706,8 +706,9 @@ func (cp *cwtchPeer) StartServerConnections() {
for _, contact := range cp.GetContacts() {
if cp.GetContact(contact).IsServer() {
err := cp.JoinServer(contact)
if err == nil {
if err != nil {
// Almost certainly a programming error so print it..
log.Errorf("error joining server %v", err)
}
}
}
@ -853,8 +854,8 @@ func (cp *cwtchPeer) eventHandler() {
// Automated Join Server Request triggered by a plugin.
log.Debugf("profile received an automated retry event for %v", ev.Data[event.GroupServer])
err := cp.JoinServer(ev.Data[event.GroupServer])
if err == nil {
log.Debugf("error joining server... %v", err)
if err != nil {
log.Errorf("error joining server... %v", err)
}
case event.NewGetValMessageFromPeer:
onion := ev.Data[event.RemotePeer]