Commit 8e16122 1 parent 039ce64 commit 8e16122 Copy full SHA for 8e16122
File tree 2 files changed +6
-5
lines changed
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -30,9 +30,9 @@ var cl = channel.NewLocalChannel()
30
30
// stop hang process
31
31
func Destroy (ctx context.Context , c spec.Channel , action string ) * spec.Response {
32
32
suid := ctx .Value (spec .Uid )
33
- /* If suid is specified, it will be deleted exactly
33
+ /* If suid is specified, it will be deleted exactly
34
34
* according to suid, otherwise it will be based on action. */
35
- if suid != nil && suid != spec .UnknownUid {
35
+ if suid != nil && suid != spec .UnknownUid && suid != "" {
36
36
ctx = context .WithValue (ctx , channel .ProcessKey , suid )
37
37
} else {
38
38
ctx = context .WithValue (ctx , channel .ProcessKey , action )
Original file line number Diff line number Diff line change @@ -106,13 +106,14 @@ func main() {
106
106
}
107
107
108
108
uid := expModel .ActionFlags [model .UidFlag .Name ]
109
- if uid == "" {
110
- uid , _ = util .GenerateUid ()
111
- }
112
109
113
110
ctx = context .WithValue (ctx , spec .Uid , uid )
114
111
if mode == spec .Destroy {
115
112
ctx = spec .SetDestroyFlag (ctx , uid )
113
+ } else {
114
+ if uid == "" {
115
+ uid , _ = util .GenerateUid ()
116
+ }
116
117
}
117
118
118
119
if expModel .ActionFlags [model .DebugFlag .Name ] == spec .True {
You can’t perform that action at this time.
0 commit comments