Tweaked HTTP 208 retry behaviour, fixed big causing retries to almost always fail.

This commit is contained in:
Thulinma 2013-03-24 20:48:34 +01:00
parent 3d64c4996a
commit 4c4307e033

View file

@ -286,7 +286,7 @@ namespace Connector_HTTP {
} }
//check if the whole response was received //check if the whole response was received
if (H.Read(connconn[uid]->conn->Received().get())){ if (H.Read(connconn[uid]->conn->Received().get())){
//208 means the fragment is too new, retry in 2000ms //208 means the fragment is too new, retry in 3s
if (H.url == "208"){ if (H.url == "208"){
retries++; retries++;
if (retries >= 5){ if (retries >= 5){
@ -296,8 +296,9 @@ namespace Connector_HTTP {
} }
connconn[uid]->lastuse = 0; connconn[uid]->lastuse = 0;
timeout = 0; timeout = 0;
Util::sleep(5000); Util::sleep(3000);
connconn[uid]->conn->SendNow(request); connconn[uid]->conn->SendNow(request);
H.Clean();
continue; continue;
} }
break; //continue down below this while loop break; //continue down below this while loop