Fix deadlock in gdb-client tests

Using a listen queue of length 0 caused a deadlock on my machine in the
gdb-client tests while attempting to establish the loopback socket
connection.

I am not sure if this is down to a different python or kernel version,
but in either case, having queue of length zero sounds like a bad idea,
so I'm bumping that to one (which also fixes the deadlock).

llvm-svn: 341096
This commit is contained in:
Pavel Labath 2018-08-30 19:14:02 +00:00
parent 2123ea7d5c
commit a95c33f600
1 changed files with 1 additions and 1 deletions

View File

@ -246,7 +246,7 @@ class MockGDBServer:
addr = ("127.0.0.1", self.port)
self._socket.bind(addr)
self.port = self._socket.getsockname()[1]
self._socket.listen(0)
self._socket.listen(1)
self._thread = threading.Thread(target=self._run)
self._thread.start()