Navigation Menu

Skip to content

Commit

Permalink
close #1. Remove unused variable
Browse files Browse the repository at this point in the history
  • Loading branch information
jmillan committed May 7, 2019
1 parent 5d0b630 commit cef8ca0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Broadcaster.cpp
Expand Up @@ -75,8 +75,6 @@ std::future<std::string> Broadcaster::OnProduce(

std::promise<std::string> promise;

uint32_t producerId = rtc::CreateRandomId();

/* clang-format off */
json body =
{
Expand All @@ -103,7 +101,7 @@ std::future<std::string> Broadcaster::OnProduce(
auto response = json::parse(r.text);

auto it = response.find("id");
if (it == response.end())
if (it == response.end() || !it->is_string())
promise.set_exception(std::make_exception_ptr("'id' missing in response"));

promise.set_value((*it).get<std::string>());
Expand Down

0 comments on commit cef8ca0

Please sign in to comment.