[Dovecot] 2.0.beta4 "OK Still here" not flushed?
Hello, everybody!
I've noticed that my installation of K-9 Mail on Android has been consuming a lot of battery power recently. I've been running it connecting to 2.0.beta3 for the past few weeks and just upgraded to 2.0.beta4 while debugging this issue. There is a conspicuous lack of "OK Still here" messages in my IDLE connections. The lack of these "OK Still here" messages means that the idling connections get dropped very frequently, which causes K-9 Mail to expend much more effort than just receiving the periodic "OK Still here" and going back to sleep.
The "OK Still here" messages sometimes arrive, however, just before an untagged FETCH, however.
I do not know anything about dovecot internals, but I suspected that the "OK Still here" messages were not being flushed, so I modified line 270 of src/imap/imap-client.c to be: if (1 || o_stream_get_buffer_used_size(client->output) >=
which I am sure is the wrong solution, since it forces a flush for every output line and would be quite inefficient. However, with that modification, the "OK Still here" messages appear reliably. Hopefully, there is a way to specifically flush just the "OK Still here" messages appropriately.
I'd be happy to test any real solutions to this issue.
Sincerely, Dan.
On Wed, 2010-04-14 at 22:12 -0500, Daniel I. Applebaum wrote:
Hopefully, there is a way to specifically flush just the "OK Still here" messages appropriately.
Hmm. I'm not entirely sure when it would be broken, since I couldn't reproduce it. But I think this fixes it: http://hg.dovecot.org/dovecot-2.0/rev/ffc28ea81538
Timo Sirainen wrote:
Hmm. I'm not entirely sure when it would be broken, since I couldn't reproduce it. But I think this fixes it: http://hg.dovecot.org/dovecot-2.0/rev/ffc28ea81538
Thanks! That patch does fix the problem for me and I now get the "OK Still here" messages without my change to flush all outbound messages.
Dan.
participants (2)
-
Daniel I. Applebaum
-
Timo Sirainen