aws / aws-iot-device-sdk-embedded-C

SDK for connecting to AWS IoT from a device using embedded C.
MIT License
978 stars 625 forks source link

sockets_posix.c implementation is not portable because it assumes SO_SNDTIMEO/SO_RCVTIMEO is supported #1744

Closed yiting16 closed 2 years ago

yiting16 commented 2 years ago

Refer to the POSIX documentation [1] which says that it is "implementation-defined whether the SO_SNDTIMEO/SO_RCVTIMEO option can be set."

[1] https://pubs.opengroup.org/onlinepubs/7908799/xns/setsockopt.html

Proposed fix: https://github.com/aws/aws-iot-device-sdk-embedded-C/pull/1743

The fix is to ignore the error if SO_SNDTIMEO/SO_RCVTIMEO is not supported.

I wonder if there are any side effects of not setting transport send timeouts though.