mirror of
				https://github.com/s00500/ESPUI.git
				synced 2025-11-03 23:03:23 +00:00 
			
		
		
		
	Merge pull request #301 from ChrSchu90/master
Cleanup of disconnected clients
This commit is contained in:
		@@ -449,6 +449,11 @@ void ESPUIClass::onWsEvent(
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
					        if(type == WS_EVT_CONNECT)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            ws->cleanupClients();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
        if (MapOfClients.end() == MapOfClients.find(client->id()))
 | 
					        if (MapOfClients.end() == MapOfClients.find(client->id()))
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            // Serial.println("ESPUIClass::OnWsEvent:Create new client.");
 | 
					            // Serial.println("ESPUIClass::OnWsEvent:Create new client.");
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user