mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 11:15:07 +03:00 
			
		
		
		
	actually use doCancel in writeNoCopy
This commit is contained in:
		
							parent
							
								
									83e3a24423
								
							
						
					
					
						commit
						c38e40e8e3
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -292,6 +292,9 @@ func (c *Conn) writeNoCopy(msg FlowKeyMessage) error {
 | 
			
		|||
	var cancel util.Cancellation
 | 
			
		||||
	var doCancel bool
 | 
			
		||||
	phony.Block(c, func() { cancel, doCancel = c._getDeadlineCancellation(c.writeDeadline) })
 | 
			
		||||
	if doCancel {
 | 
			
		||||
		defer cancel.Cancel(nil)
 | 
			
		||||
	}
 | 
			
		||||
	var err error
 | 
			
		||||
	select {
 | 
			
		||||
	case <-cancel.Finished():
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue