mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	some platforms may raise ENOTCONN if the stack has disconnected the socket on behalf of the peer.
This commit is contained in:
		
							parent
							
								
									9d36fd2acb
								
							
						
					
					
						commit
						b5faac73a4
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		|  | @ -445,7 +445,12 @@ def get_request(self): | |||
| 
 | ||||
|     def close_request(self, request): | ||||
|         """Called to clean up an individual request.""" | ||||
|         try: | ||||
|             #explicitly shutdown.  socket.close() merely releases | ||||
|             #the socket and waits for GC to perform the actual close. | ||||
|             request.shutdown(socket.SHUT_WR) | ||||
|         except socket.error: | ||||
|             pass #some platforms may raise ENOTCONN here | ||||
|         request.close() | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Kristján Valur Jónsson
						Kristján Valur Jónsson