From: Stefan Metzmacher Date: Sat, 21 Sep 2024 10:32:55 +0000 (+0200) Subject: RawDCERPCTest: ignore errors in smb_pipe_socket.close() X-Git-Tag: tdb-1.4.13~970 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b51ab42284211981a1ee6c8865845c7dfc985cb4;p=thirdparty%2Fsamba.git RawDCERPCTest: ignore errors in smb_pipe_socket.close() BUG: https://bugzilla.samba.org/show_bug.cgi?id=14356 Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- diff --git a/python/samba/tests/dcerpc/raw_testcase.py b/python/samba/tests/dcerpc/raw_testcase.py index 743fa0f38c1..f3a4cdff459 100644 --- a/python/samba/tests/dcerpc/raw_testcase.py +++ b/python/samba/tests/dcerpc/raw_testcase.py @@ -56,7 +56,17 @@ class smb_pipe_socket(object): return def close(self): - self.smbconn.close(self.smbfid) + try: + self.smbconn.close(self.smbfid) + except NTSTATUSError as e: + if e.args[0] == NT_STATUS_CONNECTION_DISCONNECTED: + pass + elif e.args[0] == NT_STATUS_PIPE_DISCONNECTED: + pass + elif e.args[0] == NT_STATUS_IO_TIMEOUT: + pass + else: + raise e del self.smbconn def settimeout(self, timeo):