Disconnect on BYE

This commit is contained in:
M66B
2022-01-28 09:49:25 +01:00
parent 86d655c98e
commit 7f67e79839
3 changed files with 11 additions and 4 deletions

View File

@@ -558,9 +558,12 @@ 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].isOK()) {
if (responses[responses.length - 1].isBYE())
protocol.disconnect();
throw new ProtocolException(
context.getString(R.string.title_service_auth, responses[responses.length - 1]));
}
List<Integer> msgnums = new ArrayList<>();
for (Response response : responses)