From 66eeadd75424877f7f2fea8ae89c6184d7b6b74b Mon Sep 17 00:00:00 2001 From: Anton Tiurin Date: Mon, 9 Feb 2015 09:10:50 +0300 Subject: [PATCH] [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 --- storagedriver/ipc/client.go | 1 - 1 file changed, 1 deletion(-) diff --git a/storagedriver/ipc/client.go b/storagedriver/ipc/client.go index fcb5c4625..fab731132 100644 --- a/storagedriver/ipc/client.go +++ b/storagedriver/ipc/client.go @@ -158,7 +158,6 @@ func (driver *StorageDriverClient) Stop() error { killErr = driver.subprocess.Process.Kill() } if driver.stopChan != nil { - driver.stopChan <- struct{}{} close(driver.stopChan) }