Skip to content

Commit

Permalink
Prevent potential deadlock
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartwdouglas committed Jun 9, 2021
1 parent 599c6f0 commit 3b20d40
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,17 @@ public TestRunResults getTestRunResults() {
return testRunResults;
}

public synchronized void pause() {
if (started) {
testRunner.pause();
public void pause() {
TestRunner tr = this.testRunner;
if (tr != null) {
tr.pause();
}
}

public synchronized void resume() {
if (started) {
testRunner.resume();
public void resume() {
TestRunner tr = this.testRunner;
if (tr != null) {
tr.resume();
}
}

Expand Down

0 comments on commit 3b20d40

Please sign in to comment.