From 9c93ab48deb0a0c5179b941cc036f373eb30ed6e Mon Sep 17 00:00:00 2001 From: Eugene Kabanov Date: Mon, 13 Nov 2023 13:14:21 +0200 Subject: [PATCH] Attempt to fix CI crash at Windows. (#465) * Attempt to fix CI crash at Windows. Remove all cast[string] and cast[seq[byte]] from the codebase. * Address review comments. --- chronos/internal/asyncengine.nim | 20 +++++++----- tests/testasyncstream.nim | 55 ++++++++++++++++---------------- tests/testdatagram.nim | 9 +++--- tests/testhttpclient.nim | 28 ++++++++-------- 4 files changed, 59 insertions(+), 53 deletions(-) diff --git a/chronos/internal/asyncengine.nim b/chronos/internal/asyncengine.nim index d4e803cf..578bfdf9 100644 --- a/chronos/internal/asyncengine.nim +++ b/chronos/internal/asyncengine.nim @@ -1125,14 +1125,18 @@ proc addTimer*(at: uint64, cb: CallbackFunc, udata: pointer = nil) {. proc removeTimer*(at: Moment, cb: CallbackFunc, udata: pointer = nil) = ## Remove timer callback ``cb`` with absolute timestamp ``at`` from waiting ## queue. - let loop = getThreadDispatcher() - var list = cast[seq[TimerCallback]](loop.timers) - var index = -1 - for i in 0..