Skip to content

Commit 6a252a7

Browse files
committed
IO Windows remove unused wait group
Removes an unused and unneeded wait group. Signed-off-by: Justin Terry (VM) <[email protected]>
1 parent efb04a3 commit 6a252a7

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

cio/io_windows.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import (
2020
"fmt"
2121
"io"
2222
"net"
23-
"sync"
2423

2524
winio "github.com/Microsoft/go-winio"
2625
"github.com/containerd/containerd/log"
@@ -41,7 +40,6 @@ func NewFIFOSetInDir(_, id string, terminal bool) (*FIFOSet, error) {
4140

4241
func copyIO(fifos *FIFOSet, ioset *Streams) (*cio, error) {
4342
var (
44-
wg sync.WaitGroup
4543
set []io.Closer
4644
)
4745

@@ -85,9 +83,7 @@ func copyIO(fifos *FIFOSet, ioset *Streams) (*cio, error) {
8583
}(l)
8684
set = append(set, l)
8785

88-
wg.Add(1)
8986
go func() {
90-
defer wg.Done()
9187
c, err := l.Accept()
9288
if err != nil {
9389
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) {
115111
}(l)
116112
set = append(set, l)
117113

118-
wg.Add(1)
119114
go func() {
120-
defer wg.Done()
121115
c, err := l.Accept()
122116
if err != nil {
123117
log.L.WithError(err).Errorf("failed to accept stderr connection on %s", fifos.Stderr)

0 commit comments

Comments
 (0)