diff options
author | Andrey Zelenkov <zelenkov@nginx.com> | 2018-12-25 16:35:35 +0300 |
---|---|---|
committer | Andrey Zelenkov <zelenkov@nginx.com> | 2018-12-25 16:35:35 +0300 |
commit | f5b7fee128dfabc3225e05a69a5c9458b63c315b (patch) | |
tree | bca3e599784da827cd761e987ab1a488b857c578 | |
parent | d625691ff45bd6f352a504694629af2407a7d1a1 (diff) | |
download | unit-f5b7fee128dfabc3225e05a69a5c9458b63c315b.tar.gz unit-f5b7fee128dfabc3225e05a69a5c9458b63c315b.tar.bz2 |
Tests: set TCP_NODELAY option by default.
-rw-r--r-- | test/unit.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/unit.py b/test/unit.py index e88ed684..2b95b792 100644 --- a/test/unit.py +++ b/test/unit.py @@ -309,6 +309,9 @@ class TestUnitHTTP(TestUnit): if 'sock' not in kwargs: sock = socket.socket(sock_types[sock_type], socket.SOCK_STREAM) + if sock_type == sock_types['ipv4'] or sock_type == sock_types['ipv6']: + sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) + if 'wrapper' in kwargs: sock = kwargs['wrapper'](sock) |