title: Is there a solution to initial timeout using Dart grpc?
body: <p>Using Dart Grpc, I am setting the connection timeout to 5 seconds. While this does appear to work to a degree, the initial timeout periods vary considerably. eg: 30 sec, 28 sec, 64 sec. After the initial timeout (no connection), the timeouts are consistently 3 seconds, but the first is always much longer. Is there some way that I can improve this, because the initial wait time is too long? Without setting a timeout at all, the connection appears to never timeout.
  Code is below:</p>
  
  <pre><code>import 'package:flutter/material.dart';
  import 'package:flutter/services.dart';
  import 'package:grpc/grpc.dart';
  
  import 'protos/counter1.pb.dart';
  import 'protos/counter1.pbgrpc.dart';
  
    _fnOnBuildComplete() async {
      try {
        _vChannel = ClientChannel('192.168.1.5',
            port: 8080,
            options: const ChannelOptions(
                credentials: ChannelCredentials.insecure(),
                connectionTimeout: Duration(seconds: 5)));
        _vChannel.getConnection().timeout(Duration(seconds: 5));
        _vClient = Counter1Client(_vChannel);
        _vClient..fnIncrementCounter(Counter1Request()..req1 = "0") /* INIT */;
      } catch (vError) {
        print("_fnOnBuildComplete: Error = $vError");
      }
    }
  
  </code></pre>
  
  <p>Typical Error is:</p>
  
  <pre><code>I/flutter (16490): _fnIncrementCounter: error = gRPC Error (14, Error connecting: SocketException: OS Error: No route to host, errno = 113, address = 192.168.1.5, port = 33823)
  </code></pre>