diff --git a/README.md b/README.md index 856205e2..5e90fc71 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # hot -[![version 1.0.0-rc.1](https://img.shields.io/badge/pub-1.0.0--rc.1-brightgreen.svg)](https://pub.dartlang.org/packages/angel_rethink) +[![version 1.0.0-rc.2](https://img.shields.io/badge/pub-1.0.0--rc.2-brightgreen.svg)](https://pub.dartlang.org/packages/angel_rethink) Supports *hot reloading* of Angel servers on file changes. This is faster and more reliable than merely reactively restarting a `Process`. diff --git a/lib/angel_hot.dart b/lib/angel_hot.dart index a5036a87..4542bb5f 100644 --- a/lib/angel_hot.dart +++ b/lib/angel_hot.dart @@ -177,8 +177,8 @@ class HotReloader { _handleWatchEvent(WatchEvent e) async { print('${e.path} changed. Reloading server...'); var old = _server; + if (old != null) Future.forEach(old.justBeforeStop, old.configure); _server = null; - Future.forEach(old.justBeforeStop, old.configure); _client ??= new VMServiceClient.connect(vmServiceUrl ?? 'ws://localhost:8181/ws'); diff --git a/pubspec.yaml b/pubspec.yaml index 6173fead..b90b2fe3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: angel_hot description: Supports hot reloading of Angel servers on file changes. -version: 1.0.0-rc.1 +version: 1.0.0-rc.2 author: Tobe O homepage: https://github.com/angel-dart/hot environment: