这个问题在v0.3版本可能会出现,把源码里modules/judge/g/var.go文件里,把3000那个数值加大
func InitHbsClient() {
HbsClient = &SingleConnRpcClient{
RpcServers: Config().Hbs.Servers,
Timeout: time.Duration(Config().Hbs.Timeout) * time.Millisecond,
CallTimeout: time.Duration(3000) * time.Millisecond,
}
}
具体多大,可以自己写个测试程序,调用一下,类似这样,不报错就可以了
func main() {
var strategiesResponse model.StrategiesResponse
HbsClient := &g.SingleConnRpcClient{
RpcServers: []string{"hbs地址"},
Timeout: time.Duration(600) * time.Millisecond,
CallTimeout: time.Duration(3000) * time.Millisecond,
}
err := HbsClient.Call("Hbs.GetStrategies", model.NullRpcRequest{}, &strategiesResponse)
log.Println(err)
log.Println(strategiesResponse)
}