derkuci opened a new pull request, #2770:
URL: https://github.com/apache/thrift/pull/2770

   The changes introduced in 916ae8b8134630f49d32e47c3f0f3218f855a24c causes 
OSError when the socket is of IPv4 family.  This can be verified by the code 
snippet below (at least on RHEL 8 and RHEL 9 with Python 3.9):
   ```python
   import socket
   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
   s.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, 0)
   ```
   This will raise an exception `OSError: [Errno 92] Protocol not available`.
   
   My fix is pretty simply: only set that IPv6 option when the socket family is 
IPv6.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@thrift.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to