From 9d9285df23c5d5ba4777c1691f57ce25a335e047 Mon Sep 17 00:00:00 2001 From: luxick Date: Mon, 8 Jun 2020 17:18:15 +0200 Subject: [PATCH] Additional check when setting timeout --- src/randopix.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/randopix.nim b/src/randopix.nim index bdb5aa5..e8b6963 100644 --- a/src/randopix.nim +++ b/src/randopix.nim @@ -149,7 +149,8 @@ proc checkServerChannel(image: Image): bool = let val = msg.parameter.parseInt * 1000 log "Setting timeout to ", val args.timeout = val - discard updateTimeout.remove + if updateTimeout > 0: + discard updateTimeout.remove updateTimeout = int(timeoutAdd(uint32(args.timeout), timedUpdate, image)) of cMode: