Handle null exitCode (#36)
* Handle null exitCode
* prep for release
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7ae5208..e862aee 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.1.19
+
+* Work around https://github.com/dart-lang/sdk/issues/35874.
+
## 0.1.18
* Add a `trackWork` optional named argument to `BazelDriver.doWork`. This allows
diff --git a/lib/src/driver/driver.dart b/lib/src/driver/driver.dart
index 8049546..8a3fb04 100644
--- a/lib/src/driver/driver.dart
+++ b/lib/src/driver/driver.dart
@@ -112,7 +112,8 @@
// When the worker exits we should retry running the work queue in case
// there is more work to be done. This is primarily just a defensive
// thing but is cheap to do.
- worker.exitCode.then((exitCode) {
+ // exitCode can be null: https://github.com/dart-lang/sdk/issues/35874
+ worker.exitCode?.then((exitCode) {
_idleWorkers.remove(worker);
_readyWorkers.remove(worker);
_runWorkQueue();
diff --git a/pubspec.yaml b/pubspec.yaml
index 3f4462d..58d70cd 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,5 +1,5 @@
name: bazel_worker
-version: 0.1.18
+version: 0.1.19
description: Tools for creating a bazel persistent worker.
author: Dart Team <misc@dartlang.org>