1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 11:42:16 -05:00

* Fix for "Consistently getting 'Connection Error' messages when getting new mail on a POP3 account"

Patch for Issue 67 from baolongnt++.
This commit is contained in:
Jesse Vincent 2008-11-06 06:55:29 +00:00
parent a3878bf41d
commit 38748c59ca

View File

@ -296,6 +296,11 @@ public class Pop3Store extends Store {
* being friendly. * being friendly.
*/ */
} }
closeIO();
}
private void closeIO() {
try { try {
mIn.close(); mIn.close();
} catch (Exception e) { } catch (Exception e) {
@ -785,6 +790,7 @@ public class Pop3Store extends Store {
} }
private String executeSimpleCommand(String command) throws IOException, MessagingException { private String executeSimpleCommand(String command) throws IOException, MessagingException {
try {
open(OpenMode.READ_WRITE); open(OpenMode.READ_WRITE);
if (command != null) { if (command != null) {
@ -799,6 +805,11 @@ public class Pop3Store extends Store {
return response; return response;
} }
catch (IOException e) {
closeIO();
throw e;
}
}
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {