summaryrefslogtreecommitdiffhomepage
path: root/pkg/waiter
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/waiter')
-rwxr-xr-xpkg/waiter/waiter_list.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/pkg/waiter/waiter_list.go b/pkg/waiter/waiter_list.go
index 02fdb730d..07950faa4 100755
--- a/pkg/waiter/waiter_list.go
+++ b/pkg/waiter/waiter_list.go
@@ -135,8 +135,9 @@ func (l *waiterList) InsertBefore(a, e *Entry) {
// Remove removes e from l.
func (l *waiterList) Remove(e *Entry) {
- prev := waiterElementMapper{}.linkerFor(e).Prev()
- next := waiterElementMapper{}.linkerFor(e).Next()
+ linker := waiterElementMapper{}.linkerFor(e)
+ prev := linker.Prev()
+ next := linker.Next()
if prev != nil {
waiterElementMapper{}.linkerFor(prev).SetNext(next)
@@ -149,6 +150,9 @@ func (l *waiterList) Remove(e *Entry) {
} else {
l.tail = prev
}
+
+ linker.SetNext(nil)
+ linker.SetPrev(nil)
}
// Entry is a default implementation of Linker. Users can add anonymous fields