Skip to content

Commit 3927044

Browse files
committed
refactoring if
1 parent 2fa49cc commit 3927044

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

internal/orchestrator/orchestrator.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -452,12 +452,12 @@ func RestartApp(
452452
return
453453
}
454454

455-
if runningApp != nil && runningApp.FullPath.String() != appToStart.FullPath.String() {
456-
yield(StreamMessage{error: fmt.Errorf("another app %q is running", runningApp.Name)})
457-
return
458-
}
459-
460455
if runningApp != nil {
456+
if runningApp.FullPath.String() != appToStart.FullPath.String() {
457+
yield(StreamMessage{error: fmt.Errorf("another app %q is running", runningApp.Name)})
458+
return
459+
}
460+
461461
stopStream := StopApp(ctx, *runningApp)
462462
for msg := range stopStream {
463463
if !yield(msg) {

0 commit comments

Comments
 (0)