diff --git a/osquery/TPipe.py b/osquery/TPipe.py index e74ac51..eb2a288 100644 --- a/osquery/TPipe.py +++ b/osquery/TPipe.py @@ -32,7 +32,7 @@ def close(self): in the same way """ if self._handle is not None: - win32pipe.DisconnectNamedPipe(self._handle) + win32file.CloseHandle(self._handle) self._handle = None @@ -227,6 +227,5 @@ def close(self): attempts are successful """ if self._handle is not None: + win32pipe.DisconnectNamedPipe(self._handle) super(TPipe, self).close() - win32file.CloseHandle(self._handle) - self._handle = None