diff options
author | LemonBoy <thatlemon@gmail.com> | 2022-04-04 21:13:35 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-04-04 21:13:35 +0100 |
commit | 1b76a8dfe21903d6f3ff190e84f3690ee7a73643 (patch) | |
tree | 6fb6be679c8a04b74f3f77e0d26b62a107255483 /src/testdir/test_channel.py | |
parent | d0fb2d804183c2786578b4c32ba5b92938f93d0e (diff) |
patch 8.2.4690: channel tests fail on MS-Windowsv8.2.4690
Problem: Channel tests fail on MS-Windows.
Solution: Check if the AF_UNIX attribute exists. (closes #10083)
Diffstat (limited to 'src/testdir/test_channel.py')
-rw-r--r-- | src/testdir/test_channel.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/testdir/test_channel.py b/src/testdir/test_channel.py index b0c3140927..3ef0fde0f8 100644 --- a/src/testdir/test_channel.py +++ b/src/testdir/test_channel.py @@ -19,12 +19,7 @@ except ImportError: # Python 2 import SocketServer as socketserver -class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler): - - def setup(self): - if self.server.address_family != socket.AF_UNIX: - self.request.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) - +class TestingRequestHandler(socketserver.BaseRequestHandler): def handle(self): print("=== socket opened ===") while True: @@ -240,6 +235,10 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler): elif decoded[0] < 0: last_eval = decoded +class ThreadedTCPRequestHandler(TestingRequestHandler): + def setup(self): + self.request.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) + class ThreadedTCPServer(socketserver.ThreadingMixIn, socketserver.TCPServer): pass |