On Wed, Aug 19, 2015 at 06:30:51PM -0700, Kevin J. McCarthy wrote:
> Hi Allen!
> 
> Thanks for your favorable feedback on the new patch.  Have you had a
> chance to test it for a while?

I’ve been testing it for about a day now :) But I will now be using it daily 
and I’ll let you know if anything goes haywire.

> […]

> > * It’s good that you expanded this to include write sockets as well. But I 
> > really think that the write timeout and the read timeout should be separate 
> > config vars. For me, for example, I will have the read timeout set to 
> > something low (5 or 10 seconds). But if I’m sending an email with a large 
> > attachment, or on a slow connection, I want it to be something like 1 
> > minute 
> > or even 2.
> 
> The timeout isn't for the entire upload/download, it's for each
> individual read/write operation.  At least in smtp.c mutt is generally
> using buffer sizes of 1K.  Additionally, in gnutls (from what I remember
> poking in the code), a partial read/write will return the data and won't
> set an error.  So you would only have to be concerned if no data at all
> was received or sent during the timeout interval.
> 
> Based on that behavior, I don't think exposing settings for each would
> be helpful.  (And mutt already has plenty of settings...)

I do still think there should be two values – but after giving it some 
thought I have a different suggestion than what I wrote above.

I know mutt has a lot of settings but whoever doesn’t want to set them will 
of course be provided with a default. And mutt is after all for tweakers 
isn’t it?

(And I do realise it’s not about the time it takes to send/receive an entire 
email, just the small bits of data which are passed about in the sockets).

Most people don’t realise (and I didn’t until I looked at it closely) that 
when mutt is idling, it is actually communicating pretty intensively. (With 
IMAP, in any case). So we can have one config var for ‘socket timeout on 
idle’. This is to solve the hanging mutt problem which people (like me) are 
complaining about when you pack up your laptop and go somewhere else. And, 
it can be the same value for read and write.

The default of 30 secs is ok. Tweakers will want to decrease this number (I 
have it set to 10 secs, which works great for me).

Then, when you are sending or receiving mail, the timeout should be set to a 
second, larger value. Something like ‘socket timeout on data’.

This is so that when you’re on a shaky connection, downloading a large email 
or sending one, and praying for that attachment to get through, it will be 
really frustrating if it keeps giving up after 10 or even 30 seconds.

Thoughts?

Grts. Allen

Reply via email to