On Tue, Nov 29, 2022 at 09:44:25AM +0100, Petr Pisar wrote:
If a network is unreliable, you will have similar problem with writing to the TCP socket. I think it would be better to rename the option to socket_timeout and use the same value for both setsockopt(, SO_RCVTIMEO, ) and setsockopt(, SO_SNDTIMEO, ).
Thanks for your feedback Petr. In my experience, I've found that writing (small amounts) to a "hung" socket doesn't seem to be a problem - the computer buffers it or something; it's trying to read the response back that hangs. The $imap_poll_timeout code works in that way, at least, sending a NOOP and polling those seconds for a response.
If that's not always the case then we can add a SNDTIMEO too. -- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA
signature.asc
Description: PGP signature