Fix panic in integration tests

Closing activationLock only if it's not closed already. This is needed
only because integration tests using docker code directly and doesn't
care about global state.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: c71747571458bf992c729c483c9509e8182d630b
Component: engine
This commit is contained in:
Alexander Morozov
2015-03-31 15:12:15 -07:00
parent 9ef99b3372
commit 03e99ba9b2
+3 -1
View File
@@ -95,7 +95,9 @@ func AcceptConnections(job *engine.Job) error {
go systemd.SdNotify("READY=1")
// close the lock so the listeners start accepting connections
if activationLock != nil {
select {
case <-activationLock:
default:
close(activationLock)
}