imap/2717: mutt may appear to hang while it reconnects to IMAP server
>Number: 2717
>Notify-List:
>Category: imap
>Synopsis: mutt may appear to hang while it reconnects to IMAP server
>Confidential: no
>Severity: normal
>Priority: medium
>Responsible: mutt-dev
>State: open
>Keywords:
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jan 27 23:12:10 +0100 2007
>Originator: Sergey Svishchev
>Release: 1.5.13
>Organization:
>Environment:
NetBSD/i386 3.0.2
>Description:
If connection to IMAP/SSL server is dropped (perhaps because
dynamically-assigned IP on the client has changed), subsequent attempt to
reconnect appears to hang -- mutt does not respond to keyboard (SIGTERM) and
has to be killed (SIGQUIT). Actually, mutt just waits for more data from
socket but never receives any, and after ~30 minutes read() times out.
A partial fix (clean up previous connection state before reconnecting) is
attached.
>How-To-Repeat:
>Fix:
see attachment.
>Add-To-Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="patch-imap-hang"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="patch-imap-hang"
LS0tIGltYXAvaW1hcC5jLm9yaWcJMjAwNi0wOC0xMSAwOTowNDozNi4wMDAwMDAwMDAgKzAwMDAK
KysrIGltYXAvaW1hcC5jCTIwMDctMDEtMjMgMjE6NTM6MzMuMDAwMDAwMDAwICswMDAwCkBAIC0z
NTgsOCArMzU4LDE2IEBACiAgICAgbmV3ID0gMTsKICAgfQogCi0gIGlmIChpZGF0YS0+c3RhdGUg
PT0gSU1BUF9ESVNDT05ORUNURUQpCisgIGlmIChpZGF0YS0+c3RhdGUgPT0gSU1BUF9ESVNDT05O
RUNURUQpIHsKKyAgICBpZGF0YS0+c2Vxbm8gPSBpZGF0YS0+bmV4dGNtZCA9IGlkYXRhLT5sYXN0
Y21kID0gMDsKKyAgICBtZW1zZXQoaWRhdGEtPmNtZHMsIDAsIHNpemVvZihJTUFQX0NPTU1BTkQp
ICogSU1BUF9QSVBFTElORV9ERVBUSCk7CisgICAgbXV0dF9idWZmZXJfZnJlZSgmaWRhdGEtPmNt
ZGJ1Zik7CisgICAgaWYgKCEoaWRhdGEtPmNtZGJ1ZiA9IG11dHRfYnVmZmVyX2luaXQgKE5VTEwp
KSkgeworICAgICAgRlJFRSAoJmlkYXRhKTsKKyAgICAgIHJldHVybiBpZGF0YTsKKyAgICB9CiAg
ICAgaW1hcF9vcGVuX2Nvbm5lY3Rpb24gKGlkYXRhKTsKKyAgfQogICBpZiAoaWRhdGEtPnN0YXRl
ID09IElNQVBfQ09OTkVDVEVEKQogICB7CiAgICAgaWYgKCFpbWFwX2F1dGhlbnRpY2F0ZSAoaWRh
dGEpKQo=