mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
attempt to fix asyncore buildbot failure
This commit is contained in:
parent
479c8f8c51
commit
ea605cd152
1 changed files with 7 additions and 2 deletions
|
@ -714,10 +714,15 @@ class BaseTestAPI(unittest.TestCase):
|
||||||
|
|
||||||
for x in xrange(20):
|
for x in xrange(20):
|
||||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
|
s.settimeout(.2)
|
||||||
s.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER,
|
s.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER,
|
||||||
struct.pack('ii', 1, 0))
|
struct.pack('ii', 1, 0))
|
||||||
s.connect(server.address)
|
try:
|
||||||
s.close()
|
s.connect(server.address)
|
||||||
|
except socket.error:
|
||||||
|
pass
|
||||||
|
finally:
|
||||||
|
s.close()
|
||||||
|
|
||||||
|
|
||||||
class TestAPI_UseSelect(BaseTestAPI):
|
class TestAPI_UseSelect(BaseTestAPI):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue