From 6b92d6b570e11be984e4e761e628c7bb1d40054a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Pavl=C3=ADn?= Date: Tue, 1 Aug 2023 20:37:01 +0200 Subject: [PATCH] fix: check nil before calling clearTimer --- waku/v2/waku_filter_v2/protocol.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/waku/v2/waku_filter_v2/protocol.nim b/waku/v2/waku_filter_v2/protocol.nim index fdac04124b..86282c191c 100644 --- a/waku/v2/waku_filter_v2/protocol.nim +++ b/waku/v2/waku_filter_v2/protocol.nim @@ -266,5 +266,6 @@ method start*(wf: WakuFilter) {.async.} = method stop*(wf: WakuFilter) {.async.} = debug "stopping filter protocol" - wf.maintenanceTask.clearTimer() + if not wf.maintenanceTask.isNil(): + wf.maintenanceTask.clearTimer() await procCall LPProtocol(wf).stop()