Skip to content

Commit

Permalink
注掉发httprequest时的lock,加lock没必要,会引起其他请求阻塞
Browse files Browse the repository at this point in the history
  • Loading branch information
weikaishio committed Apr 8, 2016
1 parent 5f5bf03 commit 5cfe6cc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,9 @@ func (p *AliMNSClient) Send(method Method, headers map[string]string, message in

postBodyReader := strings.NewReader(string(xmlContent))

p.clientLocker.Lock()
defer p.clientLocker.Unlock()
// 莫名的lock 加这个是为了啥 想不通。。 推拉模式 加lock 这是直接限流请求了
// p.clientLocker.Lock()
// defer p.clientLocker.Unlock()

var req *http.Request
if req, err = http.NewRequest(string(method), url, postBodyReader); err != nil {
Expand Down

0 comments on commit 5cfe6cc

Please sign in to comment.