Fix deadlock on plugin shutdown.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
This commit is contained in:
Anusha Ragunathan 2016-08-11 15:59:35 -07:00
parent 5947bf461f
commit 4d009084de
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)