Skip to content

Commit

Permalink
Fixes #1249 - Don't hang up when destroy is called multiple times (#1250
Browse files Browse the repository at this point in the history
)
  • Loading branch information
MeFisto94 authored and stephengold committed Jan 27, 2020
1 parent 233bc6f commit 124ad35
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -266,7 +266,11 @@ public void setAutoFlushFrames(boolean enabled){
this.autoFlush = enabled;
}

public void destroy(boolean waitFor){
public void destroy(boolean waitFor) {
if (needClose.get()) {
return; // Already destroyed
}

needClose.set(true);
if (waitFor)
waitFor(false);
Expand Down

0 comments on commit 124ad35

Please sign in to comment.