[IPC/Client] There's no need to send struct{}{} to notify a
waiting goroutine with an infinite loop about the stop. It's enough to close stopChan. Moreover it could lead to a deadlock if driver.Stop is called before driver.handleSubprocessExit. Signed-off-by: Anton Tiurin <noxiouz@yandex.ru>master
							parent
							
								
									10a194c775
								
							
						
					
					
						commit
						66eeadd754
					
				| 
						 | 
					@ -158,7 +158,6 @@ func (driver *StorageDriverClient) Stop() error {
 | 
				
			||||||
		killErr = driver.subprocess.Process.Kill()
 | 
							killErr = driver.subprocess.Process.Kill()
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if driver.stopChan != nil {
 | 
						if driver.stopChan != nil {
 | 
				
			||||||
		driver.stopChan <- struct{}{}
 | 
					 | 
				
			||||||
		close(driver.stopChan)
 | 
							close(driver.stopChan)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue