Skip to content
Snippets Groups Projects
Commit a2aa1305 authored by akwizgran's avatar akwizgran
Browse files

Fixed a crash caused by trying to modify an immutable list.

parent cd147d78
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.GeneralSecurityException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.Executor;
......@@ -184,7 +185,10 @@ abstract class DuplexConnection implements DatabaseListener {
} else if(reader.hasRequest()) {
Request r = reader.readRequest();
if(LOG.isLoggable(INFO)) LOG.info("Received request");
dbExecutor.execute(new GenerateBatches(r.getMessageIds()));
// Make a mutable copy of the requested IDs
Collection<MessageId> requested = r.getMessageIds();
requested = new ArrayList<MessageId>(requested);
dbExecutor.execute(new GenerateBatches(requested));
} else if(reader.hasRetentionAck()) {
RetentionAck a = reader.readRetentionAck();
if(LOG.isLoggable(INFO)) LOG.info("Received retention ack");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment