Fix deadlock on plugin shutdown.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 4d009084de8cad94a180130eb57efa2a98df6d98
Component: engine
This commit is contained in:
Anusha Ragunathan
2016-08-11 15:59:35 -07:00
parent f0aac47123
commit cdfc3ebd94
2 changed files with 1 additions and 5 deletions

View File

@ -46,7 +46,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithPluginEnabled(c *check.C) {
c.Assert(out, checker.Contains, "true")
}
// TestDaemonRestartWithPluginEnabled tests state restore for a disabled plugin
// TestDaemonRestartWithPluginDisabled tests state restore for a disabled plugin
func (s *DockerDaemonSuite) TestDaemonRestartWithPluginDisabled(c *check.C) {
if err := s.d.Start(); err != nil {
c.Fatalf("Could not start daemon: %v", err)

View File

@ -174,10 +174,6 @@ func (pm *Manager) Shutdown() {
}
}
close(p.exitChan)
pm.Lock()
p.PluginObj.Active = false
pm.save()
pm.Unlock()
}
if err := os.RemoveAll(p.runtimeSourcePath); err != nil {
logrus.Errorf("Remove plugin runtime failed with error: %v", err)