mirror of
				https://github.com/strongswan/strongswan.git
				synced 2025-11-04 00:00:51 -05:00 
			
		
		
		
	starter now waits for a maximum of 10s instead of 1s for charon before restarting the daemon
This commit is contained in:
		
							parent
							
								
									98ba96f185
								
							
						
					
					
						commit
						ce91f67f60
					
				@ -177,15 +177,13 @@ starter_start_charon (starter_config_t *cfg, bool no_fork)
 | 
				
			|||||||
	default:
 | 
						default:
 | 
				
			||||||
	    /* father */
 | 
						    /* father */
 | 
				
			||||||
		_charon_pid = pid;
 | 
							_charon_pid = pid;
 | 
				
			||||||
		for (i = 0; i < 50 && _charon_pid; i++)
 | 
							for (i = 0; i < 500 && _charon_pid; i++)
 | 
				
			||||||
	    {
 | 
						    {
 | 
				
			||||||
		/* wait for charon */
 | 
							/* wait for charon for a maximum of 500 x 20 ms = 10 s */
 | 
				
			||||||
		usleep(20000);
 | 
							usleep(20000);
 | 
				
			||||||
		if (stat(CHARON_PID_FILE, &stb) == 0)
 | 
							if (stat(CHARON_PID_FILE, &stb) == 0)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
		    DBG(DBG_CONTROL,
 | 
							    plog("charon (%d) started after %d ms", _charon_pid, 20*(i+1));
 | 
				
			||||||
			DBG_log("charon (%d) started", _charon_pid)
 | 
					 | 
				
			||||||
		    )
 | 
					 | 
				
			||||||
		    return 0;
 | 
							    return 0;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	    }
 | 
						    }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user