Thanks for pointing that out ! To second Kevin's comments below, I personally didn't find a SNDTIMEO necessary. Also worth noting that, at least in my case, large writes (sending email, etc.) happen while I'm sitting down, so a much more stable network connection vs., e.g., background downloading of new mail.
Happy to add a SO_SNDTIMEO while we're at it just in case/for consistency, though, if people prefer that. Best, Matthew On Tue, Nov 29, 2022 at 11:28:29AM -0800, Kevin J. McCarthy wrote: > 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