anchor.diff:      _onlines.remove(id);
     }
   
  +  void doHeartbeat(String id, Completer<bool> online) {
  +    if (heartbeat > Duration.zero) {
  +      var timeoutTimer = Timer(heartbeat, () {
  +        if (!online.isCompleted) {
  +          online.complete(false);
  +        }
  +      });
  +      online.future.then((value) {
  +        timeoutTimer.cancel();
  +        if (!value) {
  +          _onlines.remove(id);
  +        }
  +      });
  +    }
  +  }
  +
     Future<List<List>> _begin(ServiceContext context) async {
       final id = _stop(context);
  -    _onlines.putIfAbsent(id, () => true);
  -    final responder = Completer<List<List>>();
  -    if (!_send(id, responder)) {
  -      _responders[id] = responder;
  -      if (heartbeat > Duration.zero) {
  -        var timeoutTimer = Timer(heartbeat, () {
  -          if (!responder.isCompleted) {
  -            responder.complete([]);
  -          }
  -        });
  -        await responder.future.then((value) {
  -          timeoutTimer.cancel();
  -        });
  -      }
  -    }
  -    return responder.future;
  +    var online = _onlines.remove(id);
  +    if (online != null) {
  +      online.complete(true);
  +    }
  +    online = Completer<bool>();
  +    _onlines[id] =online;
  +    try {
  +      final responder = Completer<List<List>>();
  +      if (!_send(id, responder)) {
  +        _responders[id] = responder;
  +        if (idleTimeout > Duration.zero) {
  +          var timeoutTimer = Timer(idleTimeout, () {
  +            if (_responders[id] == responder) {
  +              _responders.remove(id);
  +              responder.complete([]);
  +            }
  +          });
  +          await responder.future.then((value) {
  +            timeoutTimer.cancel();
  +          });
  +        }
  +      }
  +      return await responder.future;
  +    } finally {
  +      doHeartbeat(id, online);
  +    }
     }
   
     void _end(List<List> results, ServiceContext context) {
  
positive.code:           }
          }
        }
      } while (!_closed);
    }
  
    Future<void> close() async {
  
negative.code:   final Map<String, List<List>> _calls = {};
    final Map<String, Map<int, Completer>> _results = {};
    final Map<String, Completer<List<List>>> _responders = {};
    final Map<String, Completer<bool>> _onlines = {};
    final Service service;
    var idleTimeout = const Duration(minutes: 2);
    var timeout = const Duration(seconds: 30);
    var heartbeat = const Duration(seconds: 3);
    Caller(this.service) {
      Method.registerContextType('CallerContext');
      service
  