Skip to content

Commit

Permalink
Make FakeWindowsAPI.Close() return success when it wasn't opened yet.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 485254832
  • Loading branch information
WinOps Team authored and copybara-github committed Nov 1, 2022
1 parent 43a70e0 commit 43253c8
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions winlog/fakewinlog/fake.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,6 @@ func (w *FakeWindowsAPI) ResetEvent() error {

// Close closes the subscription.
func (w *FakeWindowsAPI) Close() error {
if w.query == nil || w.cursors == nil {
return errors.New("not open")
}
w.query = nil
w.cursors = nil
return nil
Expand Down

0 comments on commit 43253c8

Please sign in to comment.