diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2020-11-27 15:26:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-27 15:26:57 +0100 |
commit | c9a10bb9e47c5227b32f49f5876e965cc2308541 (patch) | |
tree | 9021d6a50c66428df971e4d2b7d525c8c6d85724 | |
parent | 3510216c8afeee36e2997bd0f20a2b5f3c70a260 (diff) | |
download | Nim-c9a10bb9e47c5227b32f49f5876e965cc2308541.tar.gz |
fixes #16154; underlying system.add for seq is the real cause; will be addressed in a follow-up PR (#16161)
-rw-r--r-- | lib/pure/asyncdispatch.nim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/pure/asyncdispatch.nim b/lib/pure/asyncdispatch.nim index 90345676f..e111f9e7d 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 |