mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 03:05:07 +03:00 
			
		
		
		
	Try to fix race condition in sessions.reset
This commit is contained in:
		
							parent
							
								
									f4e326f5dd
								
							
						
					
					
						commit
						40204caab6
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -414,11 +414,10 @@ func (sinfo *sessionInfo) _updateNonce(theirNonce *crypto.BoxNonce) {
 | 
			
		|||
 | 
			
		||||
// Resets all sessions to an uninitialized state.
 | 
			
		||||
// Called after coord changes, so attemtps to use a session will trigger a new ping and notify the remote end of the coord change.
 | 
			
		||||
// Only call this from the router actor.
 | 
			
		||||
func (ss *sessions) reset() {
 | 
			
		||||
	for _, sinfo := range ss.sinfos {
 | 
			
		||||
		sinfo.Act(ss.router, func() {
 | 
			
		||||
			sinfo.reset = true
 | 
			
		||||
		})
 | 
			
		||||
		sinfo.reset = true
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue