Skip to content

Commit 49f976a

Browse files
meltsufinchingor13
authored andcommitted
---
yaml --- r: 33667 b: refs/heads/autosynth-redis c: aee1e2e h: refs/heads/master i: 33665: e520e18 33663: ce3d408
1 parent 2cd380f commit 49f976a

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

  • branches/autosynth-redis/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ refs/heads/autosynth-iot: 044be280805a59e06d09658688c9ee474a9815ad
135135
refs/heads/autosynth-kms: d31449d6621a50fb16a4bef4f30f0f3051d27d7c
136136
refs/heads/autosynth-language: 6130869312f99a1e7d3aa0485759172a23333cc5
137137
refs/heads/autosynth-os-login: 49028d40ac477fca5f948cc5a3ce7422729fdb67
138-
refs/heads/autosynth-redis: cda0b03316ae6213d51f045c940d8a634dbcbcf2
138+
refs/heads/autosynth-redis: aee1e2e1ee11270c0427da99a010881c5cb8949f
139139
refs/heads/autosynth-scheduler: 57f9fdb1e7de30c85f4ec7198931a07f50603e55
140140
refs/heads/autosynth-spanner: de02ca32edea133b68b51052e325359a3704b5d2
141141
refs/heads/autosynth-speech: 64692f6db11364f663921be02c08072b966b6e7b

branches/autosynth-redis/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingImpl.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,8 @@ public void flush() {
582582

583583
/* Write logs synchronously or asynchronously based on writeSynchronicity setting. */
584584
private void writeLogEntries(Iterable<LogEntry> logEntries, WriteOption... writeOptions) {
585+
if (closed) return;
586+
585587
switch (this.writeSynchronicity) {
586588
case SYNC:
587589
get(writeAsync(logEntries, writeOptions));
@@ -688,6 +690,7 @@ public void close() throws Exception {
688690
return;
689691
}
690692
closed = true;
693+
flush();
691694
rpc.close();
692695
}
693696

0 commit comments

Comments
 (0)