mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	Break circular references when closing SSLTransport objects (#981)
This commit is contained in:
		
							parent
							
								
									a0e3d2dd09
								
							
						
					
					
						commit
						d1f575116a
					
				
					 1 changed files with 6 additions and 4 deletions
				
			
		|  | @ -681,12 +681,14 @@ def _fatal_error(self, exc, message='Fatal error on transport'): | ||||||
|             self._transport._force_close(exc) |             self._transport._force_close(exc) | ||||||
| 
 | 
 | ||||||
|     def _finalize(self): |     def _finalize(self): | ||||||
|  |         self._sslpipe = None | ||||||
|  | 
 | ||||||
|         if self._transport is not None: |         if self._transport is not None: | ||||||
|             self._transport.close() |             self._transport.close() | ||||||
| 
 | 
 | ||||||
|     def _abort(self): |     def _abort(self): | ||||||
|         if self._transport is not None: |  | ||||||
|         try: |         try: | ||||||
|  |             if self._transport is not None: | ||||||
|                 self._transport.abort() |                 self._transport.abort() | ||||||
|         finally: |         finally: | ||||||
|             self._finalize() |             self._finalize() | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Michaël Sghaïer
						Michaël Sghaïer