Skip to content

Commit 9e11ba9

Browse files
committed
Merge pull request #293 from vvb/fd_leak_fix
fix for file descriptor leak in netplugin
2 parents 0c152e0 + 9b6e06b commit 9e11ba9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mgmtfn/dockplugin/dockplugin.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ func InitDockPlugin(netplugin *plugin.NetPlugin) error {
9292
}
9393

9494
log.Infof("docker plugin listening on %s", driverPath)
95-
http.Serve(l, router)
95+
server := &http.Server{Handler: router}
96+
server.SetKeepAlivesEnabled(false)
97+
server.Serve(l)
9698
l.Close()
9799
log.Infof("docker plugin closing %s", driverPath)
98100
}()

0 commit comments

Comments
 (0)