mirror of
				https://github.com/minio/minio.git
				synced 2025-10-29 15:55:00 -04:00 
			
		
		
		
	fix: allow global leader lock context merge to be canceled (#16603)
Global leader lock was first designated to only acquired once until the node is killed. However, currently, the code acquires it repeatedly during the lifetime of the server, now there is a goroutine leak.
This commit is contained in:
		
							parent
							
								
									1d3b18c3f4
								
							
						
					
					
						commit
						d6d01067a0
					
				| @ -63,6 +63,8 @@ func mergeContext(ctx1, ctx2 context.Context) (context.Context, context.CancelFu | ||||
| 		select { | ||||
| 		case <-ctx1.Done(): | ||||
| 		case <-ctx2.Done(): | ||||
| 		// The lock acquirer decides to cancel, exit this goroutine | ||||
| 		case <-ctx.Done(): | ||||
| 		} | ||||
| 
 | ||||
| 		cancel() | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user