Skip to content

Commit

Permalink
fix:init transport
Browse files Browse the repository at this point in the history
  • Loading branch information
baerwang committed Apr 21, 2022
1 parent f6548df commit b76a8ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ func handle() {
panic(err)
}

tr = &http.Transport{MaxIdleConns: 1000, MaxIdleConnsPerHost: 100}

// in advance can take out the address id,prevent limiting get fail
if aid == "" {
if aid = addressId(); aid == "" {
Expand All @@ -135,8 +137,6 @@ func handle() {
log.Println("获取收货人信息:" + aid)
}

tr = &http.Transport{MaxIdleConns: 1000, MaxIdleConnsPerHost: 100}

}

func execute(ctx context.Context, task func()) {
Expand Down

0 comments on commit b76a8ac

Please sign in to comment.