Skip to content

Commit b474cd0

Browse files
committed
put the ctx.DestroyDaprClient() into defer function
Signed-off-by: laminar <[email protected]>
1 parent 777cba1 commit b474cd0

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

context/context.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,7 @@ func (ctx *FunctionContext) InitDaprClientIfNil() {
435435

436436
if ctx.daprClient == nil {
437437
klog.Errorf("failed to init dapr client: %v", err)
438+
panic(err)
438439
}
439440
}
440441
}

runtime/knative/knative.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ func (r *Runtime) RegisterOpenFunction(
7575
return
7676
}
7777
})
78-
ctx.DestroyDaprClient()
7978
return nil
8079
}
8180

0 commit comments

Comments
 (0)