Skip to content

Commit

Permalink
only set stating to stopping (microsoft#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmc-msft authored and anshuman-goel committed Oct 1, 2020
1 parent 445bdc8 commit 8278d5b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/api-service/__app__/onefuzzlib/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,10 @@ def get_or_create(cls, region: Region) -> Optional["Proxy"]:
proxy = Proxy.get(region)
if proxy is not None:
if proxy.version != __version__:
# If the proxy is out-of-date, delete and re-create it
proxy.state = VmState.stopping
proxy.save()
if proxy.state != VmState.stopping:
# If the proxy is out-of-date, delete and re-create it
proxy.state = VmState.stopping
proxy.save()
return None
return proxy

Expand Down

0 comments on commit 8278d5b

Please sign in to comment.