Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.

Commit 14c76f8

Browse files
authored
Use buffer and name (#4)
* Buffer messages, use logName. * Reset buffer. * Fixed terrible bug.
1 parent e6fc054 commit 14c76f8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/cable_stackdriver.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,12 @@ class Stackdriver<T extends Object> implements Sink<Record<T>> {
134134
.write(
135135
new api.WriteLogEntriesRequest()
136136
..logName = _logName
137-
..entries = _pending,
137+
..entries = _pending.toList(),
138138
)
139139
.whenComplete(() => null);
140+
_pending.clear();
140141
_waiting.add(future.then((_) => _waiting.remove(future)));
142+
_buffer = null;
141143
}
142144

143145
@override

0 commit comments

Comments
 (0)