mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 22:26:06 +02:00
Added fast close
This commit is contained in:
@@ -347,6 +347,12 @@ public class Protocol {
|
||||
* @return array of Response objects returned by the server
|
||||
*/
|
||||
public synchronized Response[] command(String command, Argument args) {
|
||||
if ("LOGOUT".equals(command))
|
||||
try {
|
||||
socket.setSoTimeout(10 * 1000);
|
||||
} catch (SocketException ex) {
|
||||
eu.faircode.email.Log.e(ex);
|
||||
}
|
||||
commandStart(command);
|
||||
List<Response> v = new ArrayList<>();
|
||||
boolean done = false;
|
||||
|
||||
@@ -462,8 +462,6 @@ public class IMAPProtocol extends Protocol {
|
||||
*/
|
||||
public void logout() throws ProtocolException {
|
||||
try {
|
||||
if (!authenticated)
|
||||
return;
|
||||
Response[] r = command("LOGOUT", null);
|
||||
|
||||
authenticated = false;
|
||||
|
||||
Reference in New Issue
Block a user