diff options
author | Thomas Merkel <tm@core.io> | 2019-04-02 17:40:11 +0200 |
---|---|---|
committer | Omer Katz <omer.drow@gmail.com> | 2019-04-02 18:40:11 +0300 |
commit | 2112b002ddf85bc5aca4ebf9c37bf2d3c61186d4 (patch) | |
tree | 474bd7bf1b6abb5050b0ba69e35d56e710e971b4 | |
parent | 9ccad0c898ed41243b70baa636f10bf2b040bd9b (diff) | |
download | py-amqp-2112b002ddf85bc5aca4ebf9c37bf2d3c61186d4.tar.gz |
Provide fix for #242, Option not supported by protocol on SunOS (#272)
* Provide fix for #242, Option not supported by protocol on SunOS
It is not possible to set TCP_MAXSEG on illumos based distributions, which includes OmniOSce, SmartOS, OpenIndiana and more. The Oracle documentation provides information that the option could be set, but this isn't true based on the illumos source code: https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/inet/tcp/tcp_opt_data.c#L93-L94
Removing this option for SunOS should be no problem, because the code would anyway set the same default value which is provided by the socket.
* Fix comment.
-rw-r--r-- | amqp/platform.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/amqp/platform.py b/amqp/platform.py index c2d7216..92ef629 100644 --- a/amqp/platform.py +++ b/amqp/platform.py @@ -62,6 +62,11 @@ elif sys.platform.startswith('win'): elif sys.platform.startswith('cygwin'): KNOWN_TCP_OPTS = {'TCP_NODELAY'} +# illumos does not allow to set the TCP_MAXSEG socket option, +# even if the Oracle documentation says otherwise. +elif sys.platform.startswith('sunos'): + KNOWN_TCP_OPTS.remove('TCP_MAXSEG') + if sys.version_info < (2, 7, 7): # pragma: no cover import functools |