Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix infinity loop while waiting for migration Pod to become ready
Currently, if the user sends a SIGINT (Ctrl+C) to the process while it is waiting for the migration Pod to become Ready, the process will enter an infinity loop, because: 1. It will try to get the Pod from the API Server 2. The client will return an error because the context is expired (due to SIGINT). 3. It will continue to the next iteration of the loop. This fix, before its iteration checks if the context is Done(), and if so, returns immediately an error to the caller. Signed-off-by: Grigoris Thanasoulas <[email protected]>
- Loading branch information