mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	gh-128002: fix tsan race in closing socket in test_sslproto (#131399)
				
					
				
			This commit is contained in:
		
							parent
							
								
									812074e291
								
							
						
					
					
						commit
						ab6333f7f5
					
				
					 1 changed files with 6 additions and 7 deletions
				
			
		|  | @ -217,16 +217,15 @@ def stop(self): | ||||||
|                     pass |                     pass | ||||||
|         finally: |         finally: | ||||||
|             super().stop() |             super().stop() | ||||||
| 
 |             self._sock.close() | ||||||
|     def run(self): |  | ||||||
|         try: |  | ||||||
|             with self._sock: |  | ||||||
|                 self._sock.setblocking(False) |  | ||||||
|                 self._run() |  | ||||||
|         finally: |  | ||||||
|             self._s1.close() |             self._s1.close() | ||||||
|             self._s2.close() |             self._s2.close() | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|  |     def run(self): | ||||||
|  |         self._sock.setblocking(False) | ||||||
|  |         self._run() | ||||||
|  | 
 | ||||||
|     def _run(self): |     def _run(self): | ||||||
|         while self._active: |         while self._active: | ||||||
|             if self._clients >= self._max_clients: |             if self._clients >= self._max_clients: | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Kumar Aditya
						Kumar Aditya