binance-exchange / binance-java-api

binance-java-api is a lightweight Java library for the Binance API, supporting synchronous and asynchronous requests, as well as event streaming using WebSockets.
MIT License
831 stars 623 forks source link

Can't cleanly shutdown cleanly after getting ExchangeInfo #288

Open biomechanism opened 4 years ago

biomechanism commented 4 years ago

Hi, the OkHttpClient connection appears to remain open preventing a clean shutdown after the clien.getExchangeInfo() call. Maybe I'm missing something, but is there some way to close this connection?

BinanceApiRestClient client = factory.newRestClient();
ExchangeInfo exchangeInfo = client.getExchangeInfo();