Skip to content

Commit

Permalink
add defer os.Remove (#247)
Browse files Browse the repository at this point in the history
Signed-off-by: Cheimu <xerhoneyfc@gmail.com>
  • Loading branch information
cheimu committed Jun 13, 2022
1 parent c298bd1 commit 8910d29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/koord-runtime-proxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func main() {
if err != nil {
klog.Fatalf("Failed to create socket dir, err: %v", err)
}
defer os.Remove(options.RuntimeProxyEndpoint)

switch options.BackendRuntimeMode {
case options.BackendRuntimeModeContainerd:
Expand All @@ -62,6 +63,5 @@ func main() {

stopCh := genericapiserver.SetupSignalHandler()
<-stopCh
os.Remove(options.RuntimeProxyEndpoint)
klog.Info("RuntimeManager shutting down")
}

0 comments on commit 8910d29

Please sign in to comment.