소스 검색

using as flag of the up command, watch was blocking process shutdown
This happened when sunsetting the application from docker compose down command

Signed-off-by: Guillaume Lours <[email protected]>

Guillaume Lours 1 년 전
부모
커밋
e1fd7a6567
1개의 변경된 파일2개의 추가작업 그리고 4개의 파일을 삭제
  1. 2 4
      pkg/compose/watch.go

+ 2 - 4
pkg/compose/watch.go

@@ -183,15 +183,13 @@ func (s *composeService) watch(ctx context.Context, syncChannel chan bool, proje
 	}
 	options.LogTo.Log(api.WatchLogger, "Watch enabled")
 
-	err = eg.Wait()
 	for {
 		select {
 		case <-ctx.Done():
-			return err
+			return eg.Wait()
 		case <-syncChannel:
 			options.LogTo.Log(api.WatchLogger, "Watch disabled")
-			ctx.Done()
-			return err
+			return nil
 		}
 	}
 }