Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented May 24, 2018

bpo-32622, bpo-33353: On macOS, sock.connect() changes (resets?) the
SO_SNDBUF value. So only set SO_SNDBUF and SO_RCVBUF buffer sizes
once a socket is connected or binded, not before.

https://bugs.python.org/issue33353

bpo-32622, bpo-33353: On macOS, sock.connect() changes (resets?) the
SO_SNDBUF value. So only set SO_SNDBUF and SO_RCVBUF buffer sizes
once a socket is connected or binded, not before.
@vstinner vstinner requested review from 1st1 and asvetlov as code owners May 24, 2018 00:28
@vstinner vstinner merged commit b97de3d into python:master May 24, 2018
@vstinner vstinner deleted the test_asyncio_sndbuf branch May 24, 2018 00:43
vstinner added a commit that referenced this pull request May 24, 2018
* bpo-33353: test_asyncio uses smaller sendfile data (#7083)

bpo-32622, bpo-33353: sendfile() tests of test_asyncio use socket
buffers of 1 kB "to test on relative small data sets". Send only
160 KiB rather 10 MB to make the test much faster.

Shrink also SendfileBase.DATA from 1600 KiB to 160 KiB.

On Linux, 3 test_sock_sendfile_mix_with_regular_send() runs now take
less than 1 second, instead of 18 seconds.

On FreeBSD, the 3 tests didn't hang, but took 3 minutes. Now
the 3 tests pass in less than 1 seconds.

(cherry picked from commit 2932755)

* bpo-33353: test_asyncio set SO_SNDBUF after connect (GH-7086)

bpo-32622, bpo-33353: On macOS, sock.connect() changes the
SO_SNDBUF value. Only set SO_SNDBUF and SO_RCVBUF buffer sizes
once a socket is connected or binded, not before.

(cherry picked from commit b97de3d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants