Close Ipv4 server when failing to start Ipv6 (#12)

Fixes a bug that could prevent the VM from shutting down if there is a
port conflict with Ipv6 but not Ipv4.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 84a9e21..c03d636 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## 2.0.6
+
+* If there is a problem starting a loopback Ipv6 server, don't keep the Ipv4
+  server open when throwing the exception.
+
 ## 2.0.5
 
 * Update SDK constraints to `>=2.0.0-dev <3.0.0`.
diff --git a/lib/http_multi_server.dart b/lib/http_multi_server.dart
index 22c6d62..562092d 100644
--- a/lib/http_multi_server.dart
+++ b/lib/http_multi_server.dart
@@ -145,6 +145,10 @@
       var v6Server = await bind(InternetAddress.loopbackIPv6, v4Server.port);
       return HttpMultiServer([v4Server, v6Server]);
     } on SocketException catch (error) {
+      // If there is already a server listening we'll lose the reference on a
+      // rethrow.
+      await v4Server.close();
+
       if (error.osError.errorCode != _addressInUseErrno) rethrow;
       if (port != 0) rethrow;
       if (remainingRetries == 0) rethrow;
@@ -152,7 +156,6 @@
       // A port being available on IPv4 doesn't necessarily mean that the same
       // port is available on IPv6. If it's not (which is rare in practice),
       // we try again until we find one that's available on both.
-      await v4Server.close();
       return await _loopback(port, bind, remainingRetries - 1);
     }
   }
diff --git a/pubspec.yaml b/pubspec.yaml
index 01fd07a..175c5bc 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,5 +1,5 @@
 name: http_multi_server
-version: 2.0.6-dev
+version: 2.0.6
 
 description: A dart:io HttpServer wrapper that handles requests from multiple servers.
 author: Dart Team <misc@dartlang.org>