Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions neat_cache/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## v2.0.2
* Send `QUIT` command when closing the connection without `force: true`.

## v2.0.1
* Fixed issue when adding multiple commands without waiting for them to complete first.

Expand Down
2 changes: 1 addition & 1 deletion neat_cache/lib/src/providers/resp.dart
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ class RespClient {
Future<void> close({bool force = false}) async {
_closing = true;

if (!_closing) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How was this even supposed to work before?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we have never sent the QUIT message.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I googled it and figured closing the outgoing stream while continuing to read ought to be just as reasonable.

But I'm okay, sending QUIT, why not..

if (!force) {
// Always send QUIT message to be nice
try {
final quit = command(['QUIT']);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will throw if _closing = true I guess we need to set it later...

Expand Down
2 changes: 1 addition & 1 deletion neat_cache/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: neat_cache
version: 2.0.1
version: 2.0.2-dev
description: |
A neat cache abstraction for wrapping in-memory or redis caches.
homepage: https://github.com/google/dart-neats/tree/master/neat_cache
Expand Down