From 74c687e395c946111652c7bef4780b0aa2391cbf 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) (cherry picked from commit c9a10bb9e47c5227b32f49f5876e965cc2308541) --- 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 90345676fe5d..e111f9e7dbdf 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