private void ExecuteProtocol(IWireProtocol protocol, CancellationToken cancellationToken) { try { protocol.Execute(_connection, cancellationToken); } catch (Exception ex) { _server.HandleChannelException(_connection, ex); throw; } }
private async Task ExecuteProtocolAsync(IWireProtocol protocol, CancellationToken cancellationToken) { try { await protocol.ExecuteAsync(_connection, cancellationToken).ConfigureAwait(false); } catch (Exception ex) { _server.HandleChannelException(_connection, ex); throw; } }