From 5c43ef5f776e2ae9f29fbcccc6e13ebad3abbb83 Mon Sep 17 00:00:00 2001 From: ab76015 Date: Thu, 11 Dec 2025 18:48:21 +0100 Subject: [PATCH] Change context cancellation method in gRPC client --- vaje/08-grpc/koda/resitev/grpc/odjemalec.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vaje/08-grpc/koda/resitev/grpc/odjemalec.go b/vaje/08-grpc/koda/resitev/grpc/odjemalec.go index 1c3fbbc..1f41b70 100644 --- a/vaje/08-grpc/koda/resitev/grpc/odjemalec.go +++ b/vaje/08-grpc/koda/resitev/grpc/odjemalec.go @@ -25,7 +25,7 @@ func Client(url string) { defer conn.Close() // vzpostavimo izvajalno okolje - contextCRUD, cancel := context.WithTimeout(context.Background(), time.Second) + contextCRUD, cancel := context.WithCancel(context.Background()) defer cancel() // vzpostavimo vmesnik gRPC @@ -103,3 +103,4 @@ func Client(url string) { fmt.Println("done") } +