mirror of
https://github.com/duanhf2012/origin.git
synced 2026-03-02 11:21:11 +08:00
超时时间设为30秒
This commit is contained in:
@@ -347,9 +347,9 @@ func (client *Client) Call(serviceMethod string, args interface{}, reply interfa
|
|||||||
select {
|
select {
|
||||||
case call := <-client.Go(serviceMethod, args, reply, make(chan *Call, 1), false).Done:
|
case call := <-client.Go(serviceMethod, args, reply, make(chan *Call, 1), false).Done:
|
||||||
return call.Error
|
return call.Error
|
||||||
case <-time.After(15 * time.Second):
|
case <-time.After(30 * time.Second):
|
||||||
}
|
}
|
||||||
|
|
||||||
//call := <-client.Go(serviceMethod, args, reply, make(chan *Call, 1)).Done
|
//call := <-client.Go(serviceMethod, args, reply, make(chan *Call, 1)).Done
|
||||||
return errors.New(fmt.Sprintf("Call RPC %s is time out 10s", serviceMethod))
|
return errors.New(fmt.Sprintf("Call RPC %s is time out 30s", serviceMethod))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user