improve code quality
This commit is contained in:
		
							
								
								
									
										4
									
								
								grpc.go
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								grpc.go
									
									
									
									
									
								
							| @@ -339,7 +339,9 @@ func (g *grpcClient) Call(ctx context.Context, req client.Request, rsp interface | ||||
| 	d, ok := ctx.Deadline() | ||||
| 	if !ok { | ||||
| 		// no deadline so we create a new one | ||||
| 		ctx, _ = context.WithTimeout(ctx, callOpts.RequestTimeout) | ||||
| 		var cancel context.CancelFunc | ||||
| 		ctx, cancel = context.WithTimeout(ctx, callOpts.RequestTimeout) | ||||
| 		defer cancel() | ||||
| 	} else { | ||||
| 		// got a deadline so no need to setup context | ||||
| 		// but we need to set the timeout we pass along | ||||
|   | ||||
		Reference in New Issue
	
	Block a user