mirror of
				https://github.com/ergochat/ergo.git
				synced 2025-10-30 05:17:26 +01:00 
			
		
		
		
	fix KILL etc. for BRB'ed clients
This commit is contained in:
		
							parent
							
								
									c0b554e98c
								
							
						
					
					
						commit
						4350b92bef
					
				| @ -985,7 +985,9 @@ func (client *Client) destroy(session *Session) { | ||||
| 	} | ||||
| 
 | ||||
| 	// should we destroy the whole client this time? | ||||
| 	shouldDestroy := !client.destroyed && remainingSessions == 0 && (brbState != BrbEnabled && brbState != BrbSticky) | ||||
| 	// BRB is not respected if this is a destroy of the whole client (i.e., session == nil) | ||||
| 	brbEligible := session != nil && (brbState == BrbEnabled || brbState == BrbSticky) | ||||
| 	shouldDestroy := !client.destroyed && remainingSessions == 0 && !brbEligible | ||||
| 	if shouldDestroy { | ||||
| 		// if it's our job to destroy it, don't let anyone else try | ||||
| 		client.destroyed = true | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Shivaram Lingamneni
						Shivaram Lingamneni