private int Service(long correlationId) { int workCount = 0; try { var nowNs = _nanoClock.NanoTime(); workCount += CheckTimeouts(nowNs); workCount += _driverEventsAdapter.Receive(correlationId); } catch (Exception throwable) { HandleError(throwable); if (_driverEventsAdapter.IsInvalid) { _isTerminating = true; ForceCloseResources(); if (!IsClientApiCall(correlationId)) { throw new InvalidOperationException("Driver events adapter is invalid"); } } if (IsClientApiCall(correlationId)) { throw; } } return(workCount); }
private int Service(long correlationId) { int workCount = 0; try { workCount += OnCheckTimeouts(); workCount += _driverEventsAdapter.Receive(correlationId); } catch (Exception throwable) { HandleError(throwable); if (_driverEventsAdapter.IsInvalid) { OnClose(); } if (IsClientApiCall(correlationId)) { throw; } } return(workCount); }
private int Service(long correlationId, string expectedChannel) { int workCount = 0; try { workCount += OnCheckTimeouts(); workCount += _driverEventsAdapter.Receive(correlationId, expectedChannel); } catch (Exception throwable) { _errorHandler(throwable); if (IsClientApiCall(correlationId)) { throw; } } return(workCount); }