fix: check nil before calling clearTimer (#1869)

This commit is contained in:
Vaclav Pavlin 2023-08-02 13:31:14 +02:00 committed by GitHub
parent be5dc8f379
commit 2fc48842b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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()