From 67c4a35167ad729716f41d4e3bdb2091c173cf6b Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Fri, 27 Nov 2020 15:26:57 +0100 Subject: [PATCH] fixes #16154; underlying system.add for seq is the real cause; will be addressed in a follow-up PR (#16161) --- lib/pure/asyncdispatch.nim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/pure/asyncdispatch.nim b/lib/pure/asyncdispatch.nim index 90345676fe5dd..e111f9e7dbdfc 100644 --- a/lib/pure/asyncdispatch.nim +++ b/lib/pure/asyncdispatch.nim @@ -1199,9 +1199,10 @@ else: not p.selector.isEmpty() or p.timers.len != 0 or p.callbacks.len != 0 proc prependSeq(dest: var seq[Callback]; src: sink seq[Callback]) = - let old = move dest + var old = move dest dest = src - dest.add old + for i in 0..high(old): + dest.add(move old[i]) proc processBasicCallbacks( fd: AsyncFD, event: Event