fix crash when can't find a CID and timeout hits

the exception was not raised, thus a Nil was returned that was
than wrapped in an option, leading to crash.


Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
Csaba Kiraly 2022-10-07 00:04:01 +02:00 committed by Dmitriy Ryajov
parent f235cc6621
commit 0bd2fabaa4
No known key found for this signature in database
GPG Key ID: DA8C680CE7C657A4
1 changed files with 2 additions and 0 deletions

View File

@ -48,6 +48,8 @@ proc getWantHandle*(
raise exc
except CatchableError as exc:
trace "Pending WANT failed or expired", exc = exc.msg
# no need to cancel, it is already cancelled by wait()
raise exc
finally:
p.blocks.del(cid)