diff --git a/CryptoExchange.Net/OrderBook/SymbolOrderBook.cs b/CryptoExchange.Net/OrderBook/SymbolOrderBook.cs index f7e401a..2399980 100644 --- a/CryptoExchange.Net/OrderBook/SymbolOrderBook.cs +++ b/CryptoExchange.Net/OrderBook/SymbolOrderBook.cs @@ -133,7 +133,13 @@ namespace CryptoExchange.Net.OrderBook /// Start connecting and synchronizing the order book /// /// - public async Task> Start() + public CallResult Start() => StartAsync().Result; + + /// + /// Start connecting and synchronizing the order book + /// + /// + public async Task> StartAsync() { Status = OrderBookStatus.Connecting; var startResult = await DoStart().ConfigureAwait(false); @@ -177,10 +183,16 @@ namespace CryptoExchange.Net.OrderBook /// Stop syncing the order book /// /// - public Task Stop() + public void Stop() => StopAsync().Wait(); + + /// + /// Stop syncing the order book + /// + /// + public async Task StopAsync() { Status = OrderBookStatus.Disconnected; - return subscription.Close(); + await subscription.Close().ConfigureAwait(false); } protected abstract Task> DoStart();