CobraMetricThreadedPublisher _enable flag is an atomic, and CobraMetricsPublisher is enabled by default

This commit is contained in:
Benjamin Sergeant
2019-08-14 19:53:57 -07:00
parent b2bfccac0a
commit dd0d7c268f
5 changed files with 11 additions and 4 deletions

View File

@ -14,6 +14,7 @@
#include <vector>
#include <cstring>
#include <assert.h>
#include <zlib.h>
namespace ix
@ -52,6 +53,8 @@ namespace ix
bool HttpClient::performRequest(HttpRequestArgsPtr args,
const OnResponseCallback& onResponseCallback)
{
assert(_async && "HttpClient needs its async parameter set to true "
"in order to call performRequest");
if (!_async) return false;
// Enqueue the task