Skip to content

Commit cc60673

Browse files
author
Minggang Wang
authored
Merge pull request #151 from minggangw/fix-issue-144
Reset the error status
2 parents 5acfd2c + b660215 commit cc60673

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/rcl_bindings.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,11 +317,12 @@ NAN_METHOD(RclTakeResponse) {
317317
void* taken_response = node::Buffer::Data(info[2]->ToObject());
318318
rcl_ret_t ret = rcl_take_response(client, header, taken_response);
319319

320-
if (ret != RCL_RET_CLIENT_TAKE_FAILED) {
320+
if (ret == RCL_RET_OK) {
321321
info.GetReturnValue().Set(Nan::True());
322322
return;
323323
}
324324

325+
rcl_reset_error();
325326
info.GetReturnValue().Set(Nan::False());
326327
}
327328

0 commit comments

Comments
 (0)