When Forget was called, we delete key associated with current call from
map. When that call is done, it does delete key again, causing the same
key set by other call after Forget lost.
To fix it, adding a boolean value to check whether the call is forgotten,
the call only does delete key if Forget is not called.
Fixesgolang/go#31420
Change-Id: I9708352ca3ff76c77f659916b37a496fdeb480d2
Reviewed-on: https://go-review.googlesource.com/c/sync/+/171897
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>