mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 06:12:43 +00:00 
			
		
		
		
	LibCore: Only wait 10ms between IPC connection retries instead of 1 sec
This makes startup feel way faster in case the WindowServer is not yet available when we try connecting to it from Taskbar, Terminal, etc.
This commit is contained in:
		
							parent
							
								
									904c871727
								
							
						
					
					
						commit
						f37cf5ea4a
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		|  | @ -61,14 +61,14 @@ namespace Client { | |||
|                 CEventLoop::current().post_event(*this, make<PostProcessEvent>(m_connection->fd())); | ||||
|             }; | ||||
| 
 | ||||
|             int retries = 1000; | ||||
|             int retries = 100000; | ||||
|             while (retries) { | ||||
|                 if (m_connection->connect(CSocketAddress::local(address))) { | ||||
|                     break; | ||||
|                 } | ||||
| 
 | ||||
|                 dbgprintf("Client::Connection: connect failed: %d, %s\n", errno, strerror(errno)); | ||||
|                 sleep(1); | ||||
|                 usleep(10000); | ||||
|                 --retries; | ||||
|             } | ||||
|             ASSERT(m_connection->is_connected()); | ||||
|  | @ -260,14 +260,14 @@ namespace Client { | |||
|                 CEventLoop::current().post_event(*this, make<PostProcessEvent>(m_connection->fd())); | ||||
|             }; | ||||
| 
 | ||||
|             int retries = 1000; | ||||
|             int retries = 100000; | ||||
|             while (retries) { | ||||
|                 if (m_connection->connect(CSocketAddress::local(address))) { | ||||
|                     break; | ||||
|                 } | ||||
| 
 | ||||
|                 dbgprintf("Client::Connection: connect failed: %d, %s\n", errno, strerror(errno)); | ||||
|                 sleep(1); | ||||
|                 usleep(10000); | ||||
|                 --retries; | ||||
|             } | ||||
|             ASSERT(m_connection->is_connected()); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling