]> Cypherpunks repositories - gostls13.git/commit
internal/poll: do not call SetFileCompletionNotificationModes if it is broken
authorAlex Brainman <alex.brainman@gmail.com>
Wed, 11 Oct 2017 07:15:25 +0000 (18:15 +1100)
committerAlex Brainman <alex.brainman@gmail.com>
Thu, 12 Oct 2017 07:12:36 +0000 (07:12 +0000)
commitc37647fc3abd3aa9307d5abbce63c9d6c7c70602
tree7a13c9275a2c6bc8d5e3270275f0053fc8e65988
parent9ce43ce66797c1ddfbf365dfd83e5e17a6a7717e
internal/poll: do not call SetFileCompletionNotificationModes if it is broken

Current code assumes that SetFileCompletionNotificationModes
is safe to call even if we know that it is not safe to use
FILE_SKIP_COMPLETION_PORT_ON_SUCCESS flag. It appears (see issue #22149),
SetFileCompletionNotificationModes crashes when we call it without
FILE_SKIP_COMPLETION_PORT_ON_SUCCESS flag.

Do not call SetFileCompletionNotificationModes in that situation.
We are allowed to do that, because SetFileCompletionNotificationModes
is just an optimisation.

Fixes #22149

Change-Id: I0ad3aff4eabd8c27739417a62c286b1819ae166a
Reviewed-on: https://go-review.googlesource.com/69870
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/internal/poll/fd_windows.go