This repository was archived by the owner on Oct 30, 2023. It is now read-only.

Description
Hello guys,
when I am opening an onDepthEvent websocket on many pairs(all btc pairs), I start getting this error
java.net.SocketTimeoutException: sent ping but didn't receive pong within 20000ms (after 0 successful ping/pongs)
When checking binance official websocket api which says:
The websocket server will send a ping frame every 3 minutes. If the websocket server does not receive a pong frame back from the connection within a 10 minute period, the connection will be disconnected. Unsolicited pong frames are allowed.
I though the Ping/Pong should be sent every 3 min?
When checking BinanceApiServiceGenerator the httpClient is created:
Dispatcher dispatcher = new Dispatcher(); dispatcher.setMaxRequestsPerHost(500); dispatcher.setMaxRequests(500); sharedClient = new OkHttpClient.Builder() .dispatcher(dispatcher) .pingInterval(20, TimeUnit.SECONDS) .build();
Doesnt that mean its trying to ping and receive a pong from server within 20 seconds?
Maybe thats why the error is happening?
Thanks for any tips!