[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>
This commit is contained in:
Anton Tiurin 2015-02-09 09:10:50 +03:00
parent 10a194c775
commit 66eeadd754

View file

@ -158,7 +158,6 @@ func (driver *StorageDriverClient) Stop() error {
killErr = driver.subprocess.Process.Kill()
}
if driver.stopChan != nil {
driver.stopChan <- struct{}{}
close(driver.stopChan)
}