fix cancellation race condition. (#1352)
fix cancellation race condition. (#1352)

* fix cancellation race condition.

Microsoft/vsts-agent,Microsoft/vsts-agent,kasubram/vsts-agent,kasubram/vsts-agent,kasubram/vsts-agent,Microsoft/vsts-agent,Microsoft/vsts-agent,kasubram/vsts-agent