diff --git a/influxpush.cc b/influxpush.cc index 3d13ad7..e91f180 100644 --- a/influxpush.cc +++ b/influxpush.cc @@ -114,8 +114,14 @@ void InfluxPusher::doSend(const set& buffer) infl.open ("infl.txt", std::ofstream::out | std::ofstream::app); infl << newout; */ - - mc.postURL("http://127.0.0.1:8086/write?db="+d_dbname, newout, mch); + try { + mc.postURL("http://127.0.0.1:8086/write?db="+d_dbname, newout, mch); + } + catch(std::exception& e) { + if(strstr(e.what(), "retention")) + return; + throw; + } } } diff --git a/minicurl.cc b/minicurl.cc index b5a0189..840791a 100644 --- a/minicurl.cc +++ b/minicurl.cc @@ -151,7 +151,7 @@ std::string MiniCurl::postURL(const std::string& str, const std::string& postdat if(res != CURLE_OK || http_code >= 300 ) { cerr<<"Detailed error: "<