Merge.
This commit is contained in:
commit
0175af85a5
|
@ -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…
Reference in New Issue