Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
张铭森
hive
Commits
b35d2e45
Unverified
Commit
b35d2e45
authored
1 year ago
by
krida2000
Committed by
GitHub
1 year ago
Browse files
Options
Download
Email Patches
Plain Diff
Prevent adding events to closed stream controller (#1223)
* Prevent adding events to closed stream controller
parent
1cfa10c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
hive/lib/src/box/change_notifier.dart
hive/lib/src/box/change_notifier.dart
+3
-1
No files found.
hive/lib/src/box/change_notifier.dart
View file @
b35d2e45
...
...
@@ -17,7 +17,9 @@ class ChangeNotifier {
/// Not part of public API
void
notify
(
Frame
frame
)
{
_streamController
.
add
(
BoxEvent
(
frame
.
key
,
frame
.
value
,
frame
.
deleted
));
if
(!
_streamController
.
isClosed
)
{
_streamController
.
add
(
BoxEvent
(
frame
.
key
,
frame
.
value
,
frame
.
deleted
));
}
}
/// Not part of public API
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment