mirror of https://github.com/waku-org/nwaku.git
adding missing error handling in libwaku (#3084)
This commit is contained in:
parent
e406673c46
commit
713aa66a63
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue