Null check for old
This commit is contained in:
parent
cc759d5268
commit
786cfb9d24
3 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
# hot
|
||||
[](https://pub.dartlang.org/packages/angel_rethink)
|
||||
[](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`.
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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 <thosakwe@gmail.com>
|
||||
homepage: https://github.com/angel-dart/hot
|
||||
environment:
|
||||
|
|
Loading…
Reference in a new issue