Revert "Disconnect on BYE"

This reverts commit 7f67e79839.
pull/194/merge
M66B 3 years ago
parent 115eccbde8
commit 78cf4eca40

@ -558,12 +558,9 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
Response[] responses = protocol.command("SEARCH", arg);
if (responses.length == 0)
throw new ProtocolException("No response");
if (!responses[responses.length - 1].isOK()) {
if (responses[responses.length - 1].isBYE())
protocol.disconnect();
if (!responses[responses.length - 1].isOK())
throw new ProtocolException(
context.getString(R.string.title_service_auth, responses[responses.length - 1]));
}
List<Integer> msgnums = new ArrayList<>();
for (Response response : responses)

@ -3432,10 +3432,9 @@ class Core {
}
} else {
for (Response response : responses)
if (response.isBYE()) {
protocol.disconnect();
if (response.isBYE())
return new MessagingException("UID FETCH", new IOException(response.toString()));
} else if (response.isNO()) {
else if (response.isNO()) {
Log.e("UID FETCH " + response);
throw new CommandFailedException(response);
} else if (response.isBAD()) {

@ -1714,11 +1714,8 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
if (responses.length == 0)
throw new ProtocolException("No response");
if (!responses[responses.length - 1].isOK()) {
if (responses[responses.length - 1].isBYE())
protocol.disconnect();
if (!responses[responses.length - 1].isOK())
throw new ProtocolException(responses[responses.length - 1]);
}
for (int i = 0; i < responses.length - 1; i++) {
EntityLog.log(ServiceSynchronize.this, EntityLog.Type.Account, account,

Loading…
Cancel
Save