conngater: fix incorrect err return value (#3219)

This commit is contained in:
huochexizhan
2025-03-10 16:40:29 +01:00
committed by GitHub
parent 5e6f217d84
commit b663d7b579

View File

@@ -72,7 +72,7 @@ func (cg *BasicConnectionGater) loadRules(ctx context.Context) error {
for r := range res.Next() {
if r.Error != nil {
log.Errorf("query result error: %s", r.Error)
return err
return r.Error
}
p := peer.ID(r.Entry.Value)
@@ -89,7 +89,7 @@ func (cg *BasicConnectionGater) loadRules(ctx context.Context) error {
for r := range res.Next() {
if r.Error != nil {
log.Errorf("query result error: %s", r.Error)
return err
return r.Error
}
ip := net.IP(r.Entry.Value)
@@ -106,7 +106,7 @@ func (cg *BasicConnectionGater) loadRules(ctx context.Context) error {
for r := range res.Next() {
if r.Error != nil {
log.Errorf("query result error: %s", r.Error)
return err
return r.Error
}
ipnetStr := string(r.Entry.Value)