From 4d14bfd8adf83522056745814700e9232eaeb7c5 Mon Sep 17 00:00:00 2001 From: Kenfe-Mickael Laventure Date: Wed, 19 Jul 2017 17:50:55 +0200 Subject: [PATCH] go-winio: Don't increment the wait count if the file is closing Signed-off-by: Kenfe-Mickael Laventure --- vendor/github.com/Microsoft/go-winio/file.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/github.com/Microsoft/go-winio/file.go b/vendor/github.com/Microsoft/go-winio/file.go index 90213105b..28b395a6a 100644 --- a/vendor/github.com/Microsoft/go-winio/file.go +++ b/vendor/github.com/Microsoft/go-winio/file.go @@ -139,10 +139,10 @@ func (f *win32File) Close() error { // prepareIo prepares for a new IO operation. // The caller must call f.wg.Done() when the IO is finished, prior to Close() returning. func (f *win32File) prepareIo() (*ioOperation, error) { - f.wg.Add(1) if f.isClosing() { return nil, ErrFileClosed } + f.wg.Add(1) c := &ioOperation{} c.ch = make(chan ioResult) return c, nil