Skip to content

Commit

Permalink
add a check for empty outbpx
Browse files Browse the repository at this point in the history
  • Loading branch information
qicosmos committed Jul 24, 2019
1 parent aee0b08 commit 7395189
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/rpc_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,10 @@ namespace rest_rpc {
}

std::unique_lock<std::mutex> lock(write_mtx_);
if (outbox_.empty()) {
return;
}

::free((char*)outbox_.front().first.data());
outbox_.pop_front();

Expand Down

0 comments on commit 7395189

Please sign in to comment.