]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
RawDCERPCTest: ignore errors in smb_pipe_socket.close()
authorStefan Metzmacher <metze@samba.org>
Sat, 21 Sep 2024 10:32:55 +0000 (12:32 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 10 Oct 2024 14:01:04 +0000 (14:01 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14356

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
python/samba/tests/dcerpc/raw_testcase.py

index 743fa0f38c1f5e3b0f8ff2e7c1ca6e0adf3e056a..f3a4cdff459f572ddc9ae43f823dd2810e22ef65 100644 (file)
@@ -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):