Skip to content

Commit

Permalink
adding missing error handling in libwaku (#3084)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielmer authored Oct 2, 2024
1 parent e406673 commit 713aa66
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions library/libwaku.nim
Original file line number Diff line number Diff line change
Expand Up @@ -309,24 +309,27 @@ proc waku_start(
ctx: ptr WakuContext, callback: WakuCallBack, userData: pointer
): cint {.dynlib, exportc.} =
checkLibwakuParams(ctx, callback, userData)
## TODO: handle the error
discard waku_thread.sendRequestToWakuThread(

waku_thread
.sendRequestToWakuThread(
ctx,
RequestType.LIFECYCLE,
NodeLifecycleRequest.createShared(NodeLifecycleMsgType.START_NODE),
)
.handleRes(callback, userData)

proc waku_stop(
ctx: ptr WakuContext, callback: WakuCallBack, userData: pointer
): cint {.dynlib, exportc.} =
checkLibwakuParams(ctx, callback, userData)

## TODO: handle the error
discard waku_thread.sendRequestToWakuThread(
waku_thread
.sendRequestToWakuThread(
ctx,
RequestType.LIFECYCLE,
NodeLifecycleRequest.createShared(NodeLifecycleMsgType.STOP_NODE),
)
.handleRes(callback, userData)

proc waku_relay_subscribe(
ctx: ptr WakuContext,
Expand Down

0 comments on commit 713aa66

Please sign in to comment.