mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
attempt to fix asyncore buildbot failure
This commit is contained in:
commit
c7ea19fee8
1 changed files with 10 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue