mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Laurence Tratt notes that the accept() call in get_request() can fail,
and suggests putting a try/except around the get_request() call in handle_request(). (All in class TCPServer.)
This commit is contained in:
		
							parent
							
								
									e55702b024
								
							
						
					
					
						commit
						f2f0594587
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		|  | @ -207,7 +207,10 @@ def serve_forever(self): | |||
| 
 | ||||
|     def handle_request(self): | ||||
|         """Handle one request, possibly blocking.""" | ||||
|         try: | ||||
|             request, client_address = self.get_request() | ||||
|         except socket.error: | ||||
|             return | ||||
|         if self.verify_request(request, client_address): | ||||
|             try: | ||||
|                 self.process_request(request, client_address) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Guido van Rossum
						Guido van Rossum