Proper close on error (#21)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index d584733..b5fb859 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## 3.1.2
+
+- Fix an issue where the `SseClient` would not send a `done` event when there
+  was an error with the SSE connection.
+
 ## 3.1.1
 
 - Make `isInKeepAlive` on `SseConnection` private.
diff --git a/lib/client/sse_client.dart b/lib/client/sse_client.dart
index 764e566..232a9c9 100644
--- a/lib/client/sse_client.dart
+++ b/lib/client/sse_client.dart
@@ -47,7 +47,7 @@
         // Allow for a retry to connect before giving up.
         _errorTimer = Timer(const Duration(seconds: 5), () {
           _incomingController.addError(error);
-          _eventSource.close();
+          close();
         });
       }
     });
diff --git a/pubspec.yaml b/pubspec.yaml
index b2067ac..86d3c13 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,5 +1,5 @@
 name: sse
-version: 3.1.2-dev
+version: 3.1.2
 homepage: https://github.com/dart-lang/sse
 description: >-
   Provides client and server functionality for setting up bi-directional