Refactor WaitForCapabilityOrClose #43

Merged
erinn merged 5 commits from wait into master 2021-09-27 22:09:35 +00:00
1 changed files with 2 additions and 2 deletions
Showing only changes of commit f1fe281ab4 - Show all commits

View File

@ -76,7 +76,7 @@ func (s *BaseOnionService) WaitForCapabilityOrClose(cid string, name tapir.Capab
} }
return true return true
}) })
log.Debugf("WaitForCapabilityOrClose attempts exceeded for %v all, connections closed", cid) log.Debugf("WaitForCapabilityOrClose attempts exceeded for %v, all connections closed", cid)
return nil, errors.New("failed to acquire capability after multiple attempts, forcibly closing all connections with the peer") return nil, errors.New("failed to acquire capability after multiple attempts, forcibly closing all connections with the peer")
} }
@ -96,7 +96,7 @@ func (s *BaseOnionService) WaitForCapabilityOrClose(cid string, name tapir.Capab
log.Debugf("Found %v %v", conn, err) log.Debugf("Found %v %v", conn, err)
// If there are no active connections then return an error... // If there are no active connections then return an error...
if conn == nil { if conn == nil {
log.Debugf("Now active connection found for %v", cid) log.Debugf("no active connection found for %v", cid)
return nil, err return nil, err
} }