mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-20 22:59:54 +01:00
DatabaseComponent.generateBatch() now returns a boolean.
This allows a connection to know whether to try writing another batch immediately, or to wait for an event from the DB.
This commit is contained in:
@@ -41,8 +41,8 @@ class BatchWriterImpl implements BatchWriter {
|
||||
started = true;
|
||||
}
|
||||
// Allow one byte for the list end tag
|
||||
int capacity = ProtocolConstants.MAX_PACKET_LENGTH
|
||||
- (int) w.getBytesWritten() - 1;
|
||||
int capacity =
|
||||
ProtocolConstants.MAX_PACKET_LENGTH - (int) w.getBytesWritten() - 1;
|
||||
if(capacity < message.length) return false;
|
||||
// Bypass the writer and write each raw message directly
|
||||
out.write(message);
|
||||
|
||||
Reference in New Issue
Block a user