mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-03 22:45:13 +08:00
超时时间设为30秒
This commit is contained in:
@@ -347,9 +347,9 @@ func (client *Client) Call(serviceMethod string, args interface{}, reply interfa
|
||||
select {
|
||||
case call := <-client.Go(serviceMethod, args, reply, make(chan *Call, 1), false).Done:
|
||||
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
|
||||
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