{"action":"created","issue":{"url":"https://api.github.com/repos/k9mail/k-9/issues/989","labels_url":"https://api.github.com/repos/k9mail/k-9/issues/989/labels{/name}","comments_url":"https://api.github.com/repos/k9mail/k-9/issues/989/comments","events_url":"https://api.github.com/repos/k9mail/k-9/issues/989/events","html_url":"https://github.com/k9mail/k-9/issues/989","id":124548746,"number":989,"title":"K9 hangs up if connection goes unused for around a minute","user":{"login":"z28cueball","id":16446686,"avatar_url":"https://avatars.githubusercontent.com/u/16446686?v=3","gravatar_id":"","url":"https://api.github.com/users/z28cueball","html_url":"https://github.com/z28cueball","followers_url":"https://api.github.com/users/z28cueball/followers","following_url":"https://api.github.com/users/z28cueball/following{/other_user}","gists_url":"https://api.github.com/users/z28cueball/gists{/gist_id}","starred_url":"https://api.github.com/users/z28cueball/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/z28cueball/subscriptions","organizations_url":"https://api.github.com/users/z28cueball/orgs","repos_url":"https://api.github.com/users/z28cueball/repos","events_url":"https://api.github.com/users/z28cueball/events{/privacy}","received_events_url":"https://api.github.com/users/z28cueball/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-01-01T15:58:15Z","updated_at":"2016-01-01T23:20:51Z","closed_at":"2016-01-01T22:14:16Z","body":"This problem is happening on a Samsung running OS 4.4.4, and a Droid Turbo running OS 5.1.\r\nThis problem occurs using IMAP with EITHER polling or IDLE.\r\nThis problem occurs on 3G, 4G, and multiple internet connections.\r\nThis problem occurs with multiple e-mail providers.\r\n\r\nIf the connection is used every minute (either via e-mails coming in, going out, etc., or by a poll  or IDLE refresh), the connection is fine.  If the polling or IDLE refresh is set to anything longer than a minute, and no e-mails come in or go out, the connection stops working.\r\n\r\nOnce the connection has gone unused for over a minute, any attempt to do anything with the connection (poll, send e-mail, delete an existing email) will cause K9 mail to hang up (the application still responds, but it is stuck trying to communicate with the server).\r\n\r\nI did force close K9 after waiting 25 minutes for it to give up trying to communicate with the server and/or throw an error.  Once it was force stopped and re-opened, the following error was in the error folder:\r\n\r\njava.net.SocketException: recvfrom failed: ETIMEDOUT (Connection timed out)\r\n    at libcore.io.IoBridge.maybeThrowAfterRecvfrom(IoBridge.java:592)\r\n    at libcore.io.IoBridge.recvfrom(IoBridge.java:556)\r\n    at java.net.PlainSocketImpl.read(PlainSocketImpl.java:485)\r\n    at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:37)\r\n    at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:237)\r\n    at java.io.InputStream.read(InputStream.java:162)\r\n    at java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:149)\r\n    at java.io.BufferedInputStream.read(BufferedInputStream.java:234)\r\n    at com.fsck.k9.mail.filter.PeekableInputStream.peek(PeekableInputStream.java:34)\r\n    at com.fsck.k9.mail.store.ImapResponseParser.readResponse(ImapResponseParser.java:42)\r\n    at com.fsck.k9.mail.store.ImapResponseParser.readResponse(ImapResponseParser.java:29)\r\n    at com.fsck.k9.mail.store.ImapStore$ImapConnection.readStatusResponse(ImapStore.java:2775)\r\n    at com.fsck.k9.mail.store.ImapStore$ImapConnection.executeSimpleCommand(ImapStore.java:2925)\r\n    at com.fsck.k9.mail.store.ImapStore$ImapFolder.executeSimpleCommand(ImapStore.java:862)\r\n    at com.fsck.k9.mail.store.ImapStore$ImapFolderPusher$1.run(ImapStore.java:3151)\r\n    at java.lang.Thread.run(Thread.java:818)\r\nCaused by: android.system.ErrnoException: recvfrom failed: ETIMEDOUT (Connection timed out)\r\n    at libcore.io.Posix.recvfromBytes(Native Method)\r\n    at libcore.io.Posix.recvfrom(Posix.java:185)\r\n    at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:250)\r\n    at libcore.io.IoBridge.recvfrom(IoBridge.java:553)\r\n    ... 14 more"},"comment":{"url":"https://api.github.com/repos/k9mail/k-9/issues/comments/168350003","html_url":"https://github.com/k9mail/k-9/issues/989#issuecomment-168350003","issue_url":"https://api.github.com/repos/k9mail/k-9/issues/989","id":168350003,"user":{"login":"z28cueball","id":16446686,"avatar_url":"https://avatars.githubusercontent.com/u/16446686?v=3","gravatar_id":"","url":"https://api.github.com/users/z28cueball","html_url":"https://github.com/z28cueball","followers_url":"https://api.github.com/users/z28cueball/followers","following_url":"https://api.github.com/users/z28cueball/following{/other_user}","gists_url":"https://api.github.com/users/z28cueball/gists{/gist_id}","starred_url":"https://api.github.com/users/z28cueball/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/z28cueball/subscriptions","organizations_url":"https://api.github.com/users/z28cueball/orgs","repos_url":"https://api.github.com/users/z28cueball/repos","events_url":"https://api.github.com/users/z28cueball/events{/privacy}","received_events_url":"https://api.github.com/users/z28cueball/received_events","type":"User","site_admin":false},"created_at":"2016-01-01T23:20:50Z","updated_at":"2016-01-01T23:20:50Z","body":"Also, this behavior does NOT occur using a computer and telnet, so the issue is NOT with the mail server OR the internet connection / network setup."}}