diff --git a/osquery/TPipe.py b/osquery/TPipe.py index f6cedba..e74ac51 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: - win32file.CloseHandle(self._handle) + win32pipe.DisconnectNamedPipe(self._handle) self._handle = None @@ -227,6 +227,6 @@ 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