imap/2747: imap_keepalive ignored when less than timeout and too much idle
>Number: 2747
>Notify-List:
>Category: imap
>Synopsis: imap_keepalive ignored when less than timeout and too much idle
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: mutt-dev
>State: open
>Keywords:
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Feb 08 17:19:44 +0100 2007
>Originator: Rado S
>Release: 1.5.13cvs (2007-01-09)
>Organization:
>Environment:
>Description:
When you set "imap_keepalive" < IMAP-server-timeout < "timeout",
then IMAP-server will disconnect when you let mutt idle for too long,
despite imap_keepalive well within IMAP-server limit.
>How-To-Repeat:
Set vars to values relative to each other per desc.,
then let mutt idle.
>Fix:
attached patch
>Add-To-Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="keepalive.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="keepalive.patch"
LS0tIG9yZy9rZXltYXAuYwlUaHUgRmViICA4IDE2OjU2OjA3IDIwMDcKKysrIGN2cy0yL2tleW1h
cC5jCVRodSBGZWIgIDggMTc6MDM6MDggMjAwNwpAQCAtMzg2LDcgKzM4NiwxMyBAQAogICB7CiAg
ICAgLyogbmN1cnNlcyBkb2Vzbid0IHJldHVybiBvbiByZXNpemVkIHNjcmVlbiB3aGVuIHRpbWVv
dXQgaXMgc2V0IHRvIHplcm8gKi8KICAgICBpZiAobWVudSAhPSBNRU5VX0VESVRPUikKLSAgICAg
IHRpbWVvdXQgKChUaW1lb3V0ID4gMCA/IFRpbWVvdXQgOiA2MCkgKiAxMDAwKTsKKyAgICAgIGk9
KFRpbWVvdXQgPiAwID8gVGltZW91dCA6IDYwKTsKKworI2lmZGVmIFVTRV9JTUFQCisgICAgaW1h
cF9rZWVwYWxpdmUgKCk7CisJaWYgKChJbWFwS2VlcGFsaXZlID4gMCkgJiYgKEltYXBLZWVwYWxp
dmUgPCBpKSkgaT1JbWFwS2VlcGFsaXZlOworI2VuZGlmCisgICAgICB0aW1lb3V0IChpICogMT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