Do not close parent scope when closing continuation in concurrent execution state

This commit is contained in:
Nikolay Martynov 2019-02-08 17:02:44 -05:00
parent 11b09ba8ce
commit 9d830a3dab
1 changed files with 3 additions and 1 deletions

View File

@ -36,7 +36,9 @@ public class State {
public void closeContinuation() {
final TraceScope.Continuation continuation = continuationRef.getAndSet(null);
if (continuation != null) {
continuation.close();
// We have opened this continuation, we shall not close parent scope when we close it,
// otherwise owners of that scope will get confused.
continuation.close(false);
}
}