Skip to content

Commit

Permalink
fix: sdk load balance
Browse files Browse the repository at this point in the history
  • Loading branch information
dougsong committed Nov 18, 2022
1 parent c9dde04 commit 55956ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion env/server/server.go
Expand Up @@ -82,7 +82,7 @@ func SetDownNode(configIp string, host string) {
}

if host == configIp {
s.nextTryConnTime = nextTryConnectPeriod
s.nextTryConnTime = time.Now().Unix() + nextTryConnectPeriod
}

for k, server := range s.serverMap {
Expand Down
6 changes: 1 addition & 5 deletions protocol/http/request.go
Expand Up @@ -207,11 +207,7 @@ func RequestRecovery(appConfig config.AppConfig,
return response, nil
}

if host == appConfig.GetHost() {
return response, err
}

server.SetDownNode(host, appConfig.GetHost())
server.SetDownNode(appConfig.GetHost(), host)
}
}

Expand Down

0 comments on commit 55956ad

Please sign in to comment.