更新超时链
This commit is contained in:
parent
ccf5df87e7
commit
0927ca2068
@ -18,8 +18,6 @@ import (
|
||||
* @version 20250409
|
||||
*/
|
||||
func ClientTimeoutInvokerChain(ctx context.Context, method string, req, res interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {
|
||||
ctx, cancel := context.WithTimeout(ctx, 5*time.Second)
|
||||
defer cancel()
|
||||
return invoker(ctx, method, req, res, cc, opts...)
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user