Skip to content

Commit

Permalink
Merge pull request #190 from DataDog/olivielpeau/win-pipe-defer-conne…
Browse files Browse the repository at this point in the history
…ct-to-1st-write

[win pipes] Defer connection establishment to first write
  • Loading branch information
olivielpeau committed Mar 15, 2021
2 parents 75ff597 + 301747e commit 7c5d2db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions statsd/pipe_windows.go
Expand Up @@ -75,10 +75,10 @@ func (p *pipeWriter) Close() error {
}

func newWindowsPipeWriter(pipepath string) (*pipeWriter, error) {
conn, err := winio.DialPipe(pipepath, nil)
// Defer connection establishment to first write
return &pipeWriter{
conn: conn,
conn: nil,
timeout: defaultPipeTimeout,
pipepath: pipepath,
}, err
}, nil
}

0 comments on commit 7c5d2db

Please sign in to comment.