Skip to content

Agent Mesh

mcp-client main refactor

Tomas Tormoecb490ef3710
diff --git a/cmd/mcp-client/main.go b/cmd/mcp-client/main.go
index e127c657..a2bae28a 100644
--- a/cmd/mcp-client/main.go
+++ b/cmd/mcp-client/main.go
@@ -40,13 +40,7 @@ func main() {
log.Fatal("Must specify -url")
}
- var ctx context.Context
- var cancel context.CancelFunc
- if timeoutArgs != nil {
- ctx, cancel = context.WithTimeout(context.Background(), time.Duration(*timeoutArgs)*time.Second)
- } else {
- ctx = context.Background()
- }
+ ctx, cancel := context.WithTimeout(context.Background(), time.Duration(*timeoutArgs)*time.Second)
defer cancel()
sigs := make(chan os.Signal, 1)