make token.Done idempotent
This commit is contained in:
parent
2bb89d9c30
commit
2a0660447a
@ -73,9 +73,11 @@ func (e *vmExecutor) Done() {
|
||||
e.lk.Lock()
|
||||
defer e.lk.Unlock()
|
||||
|
||||
e.token.Done()
|
||||
e.token = nil
|
||||
e.done = true
|
||||
if !e.done {
|
||||
e.token.Done()
|
||||
e.token = nil
|
||||
e.done = true
|
||||
}
|
||||
}
|
||||
|
||||
type executionToken struct {
|
||||
|
Loading…
Reference in New Issue
Block a user