IO Windows remove unused wait group

Removes an unused and unneeded wait group.

Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
This commit is contained in:
Justin Terry (VM) 2018-08-01 09:54:31 -07:00
parent efb04a3361
commit 6a252a7141

View File

@ -20,7 +20,6 @@ import (
"fmt" "fmt"
"io" "io"
"net" "net"
"sync"
winio "github.com/Microsoft/go-winio" winio "github.com/Microsoft/go-winio"
"github.com/containerd/containerd/log" "github.com/containerd/containerd/log"
@ -41,7 +40,6 @@ func NewFIFOSetInDir(_, id string, terminal bool) (*FIFOSet, error) {
func copyIO(fifos *FIFOSet, ioset *Streams) (*cio, error) { func copyIO(fifos *FIFOSet, ioset *Streams) (*cio, error) {
var ( var (
wg sync.WaitGroup
set []io.Closer set []io.Closer
) )
@ -85,9 +83,7 @@ func copyIO(fifos *FIFOSet, ioset *Streams) (*cio, error) {
}(l) }(l)
set = append(set, l) set = append(set, l)
wg.Add(1)
go func() { go func() {
defer wg.Done()
c, err := l.Accept() c, err := l.Accept()
if err != nil { if err != nil {
log.L.WithError(err).Errorf("failed to accept stdout connection on %s", fifos.Stdout) log.L.WithError(err).Errorf("failed to accept stdout connection on %s", fifos.Stdout)
@ -115,9 +111,7 @@ func copyIO(fifos *FIFOSet, ioset *Streams) (*cio, error) {
}(l) }(l)
set = append(set, l) set = append(set, l)
wg.Add(1)
go func() { go func() {
defer wg.Done()
c, err := l.Accept() c, err := l.Accept()
if err != nil { if err != nil {
log.L.WithError(err).Errorf("failed to accept stderr connection on %s", fifos.Stderr) log.L.WithError(err).Errorf("failed to accept stderr connection on %s", fifos.Stderr)