Tweaked HTTP 208 retry behaviour, fixed big causing retries to almost always fail.
This commit is contained in:
		
							parent
							
								
									3d64c4996a
								
							
						
					
					
						commit
						4c4307e033
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -286,7 +286,7 @@ namespace Connector_HTTP {
 | 
			
		|||
        }
 | 
			
		||||
        //check if the whole response was received
 | 
			
		||||
        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"){
 | 
			
		||||
            retries++;
 | 
			
		||||
            if (retries >= 5){
 | 
			
		||||
| 
						 | 
				
			
			@ -296,8 +296,9 @@ namespace Connector_HTTP {
 | 
			
		|||
            }
 | 
			
		||||
            connconn[uid]->lastuse = 0;
 | 
			
		||||
            timeout = 0;
 | 
			
		||||
            Util::sleep(5000);
 | 
			
		||||
            Util::sleep(3000);
 | 
			
		||||
            connconn[uid]->conn->SendNow(request);
 | 
			
		||||
            H.Clean();
 | 
			
		||||
            continue;
 | 
			
		||||
          }
 | 
			
		||||
          break; //continue down below this while loop
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue