|
|
@ -55,11 +55,11 @@ func (s *wormClient) Do(req *http.Request, fn ResponseFn) {
|
|
|
|
item := &requestItem{req, fn}
|
|
|
|
item := &requestItem{req, fn}
|
|
|
|
select {
|
|
|
|
select {
|
|
|
|
case s.requestCh <- item:
|
|
|
|
case s.requestCh <- item:
|
|
|
|
logrus.Debugln("simepleClient.Do send request item by requestCh chan")
|
|
|
|
// simepleClient.Do send request item by requestCh chan
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
select {
|
|
|
|
select {
|
|
|
|
case s.requestTempCh <- item:
|
|
|
|
case s.requestTempCh <- item:
|
|
|
|
logrus.Debugln("simepleClient.Do send request item by requestTempCh chan")
|
|
|
|
// simepleClient.Do send request item by requestTempCh chan"
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
go func() {
|
|
|
|
go func() {
|
|
|
|
s.do(item)
|
|
|
|
s.do(item)
|
|
|
|