]> Cypherpunks repositories - gostls13.git/commitdiff
internal/poll: return error if WriteConsole fails
authorIan Lance Taylor <iant@golang.org>
Mon, 13 Feb 2017 23:33:03 +0000 (15:33 -0800)
committerIan Lance Taylor <iant@golang.org>
Mon, 13 Feb 2017 23:49:48 +0000 (23:49 +0000)
Fixes #19068.

Change-Id: Id76037826376b5fe8b588fe3dc02182dfaff8c21
Reviewed-on: https://go-review.googlesource.com/36935
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/internal/poll/fd_windows.go

index 33df876e9b816af3f59e9800cf1828b7f9d7847d..a40ae471586ce519a220fef403f2226a2865f817 100644 (file)
@@ -624,7 +624,7 @@ func (fd *FD) writeConsole(b []byte) (n int, err error) {
                        var written uint32
                        err = syscall.WriteConsole(fd.Sysfd, &uint16s[0], uint32(len(uint16s)), &written, nil)
                        if err != nil {
-                               return 0, nil
+                               return 0, err
                        }
                        uint16s = uint16s[written:]
                }