Move f.wg.Done() to Read and Write to avoid leaking handles

Signed-off-by: Darren Stahl <darst@microsoft.com>
This commit is contained in:
Darren Stahl
2017-05-19 15:42:58 -07:00
parent d311c76e77
commit a64f284add
2 changed files with 7 additions and 3 deletions
+2
View File
@@ -367,6 +367,8 @@ func connectPipe(p *win32File) error {
if err != nil {
return err
}
defer p.wg.Done()
err = connectNamedPipe(p.handle, &c.o)
_, err = p.asyncIo(c, nil, 0, err)
if err != nil && err != cERROR_PIPE_CONNECTED {