mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
attempt to fix asyncore buildbot failure
This commit is contained in:
@@ -789,13 +789,17 @@ class BaseTestAPI(unittest.TestCase):
|
||||
count=500))
|
||||
t.start()
|
||||
|
||||
for x in range(20):
|
||||
s = socket.socket(self.family, socket.SOCK_STREAM)
|
||||
s.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER,
|
||||
struct.pack('ii', 1, 0))
|
||||
s.connect(server.address)
|
||||
s.close()
|
||||
|
||||
s = socket.socket(self.family, socket.SOCK_STREAM)
|
||||
s.settimeout(.2)
|
||||
s.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER,
|
||||
struct.pack('ii', 1, 0))
|
||||
try:
|
||||
s.connect(server.address)
|
||||
except socket.error:
|
||||
pass
|
||||
finally:
|
||||
s.close()
|
||||
|
||||
class TestAPI_UseIPv4Sockets(BaseTestAPI):
|
||||
family = socket.AF_INET
|
||||
|
||||
Reference in New Issue
Block a user