[driver] actually start the timer when connecting

This commit is contained in:
Yegor Jbanov 2016-03-18 14:38:34 -07:00
parent 2988cab732
commit 8aac1c996c

View file

@ -312,7 +312,7 @@ void restoreVmServiceConnectFunction() {
/// ///
/// Times out after 30 seconds. /// Times out after 30 seconds.
Future<VMServiceClient> _waitAndConnect(String url) async { Future<VMServiceClient> _waitAndConnect(String url) async {
Stopwatch timer = new Stopwatch(); Stopwatch timer = new Stopwatch()..start();
Future<VMServiceClient> attemptConnection() { Future<VMServiceClient> attemptConnection() {
return VMServiceClient.connect(url) return VMServiceClient.connect(url)
.catchError((dynamic e) async { .catchError((dynamic e) async {