tests/testlib/badserverext.py
changeset 49299 4554e2e965e2
parent 49298 425ca3428d03
--- a/tests/testlib/badserverext.py	Tue May 31 02:36:05 2022 +0200
+++ b/tests/testlib/badserverext.py	Tue May 31 02:47:22 2022 +0200
@@ -335,12 +335,7 @@
 
     def _close(self):
         # We wrap an io.BufferedIO instance.
-        orig = object.__getattribute__(self, '_orig')
-
-        if hasattr(orig, 'raw'):
-            orig.raw._sock.shutdown(socket.SHUT_RDWR)
-        else:
-            self.close()
+        self.raw._sock.shutdown(socket.SHUT_RDWR)
 
     def read(self, size=-1):
         cond = object.__getattribute__(self, '_cond')