Using unix domain sockets for docker syslog collector

This commit is contained in:
Diptanu Choudhury
2016-03-09 23:25:31 -08:00
parent 4478238ff6
commit 8e13eaa522
3 changed files with 40 additions and 5 deletions

View File

@@ -7,6 +7,7 @@ import (
"net"
"os"
"path/filepath"
"runtime"
"sync"
"time"
@@ -260,9 +261,11 @@ func (a *Agent) setupClient() error {
return fmt.Errorf("client setup failed: %v", err)
}
// Reserve some ports for the plugins
if err := a.reservePortsForClient(conf); err != nil {
return err
// Reserve some ports for the plugins if we are on Windows
if runtime.GOOS == "windows" {
if err := a.reservePortsForClient(conf); err != nil {
return err
}
}
// Create the client