diff --git a/examples/golang/codex.go b/examples/golang/codex.go index a2385a62..14fc2d6e 100644 --- a/examples/golang/codex.go +++ b/examples/golang/codex.go @@ -488,10 +488,9 @@ func (node CodexNode) Destroy() error { } if C.cGoCodexDestroy(node.ctx, bridge.resp) != C.RET_OK { - return bridge.callError("cGoCodexDestroy") + return errors.New("Failed to destroy the codex node.") } - _, err = bridge.wait() return err } diff --git a/library/libcodex.nim b/library/libcodex.nim index df8aa5d9..6619afeb 100644 --- a/library/libcodex.nim +++ b/library/libcodex.nim @@ -270,7 +270,7 @@ proc codex_destroy( let res = codex_context.destroyCodexContext(ctx) if res.isErr: - return callback.error(res.error, userData) + return RET_ERR return RET_OK