binance-connector-java
binance-connector-java copied to clipboard
feat: change web socket ping interval duration
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: mahbodsn
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve
in a comment
Approvers can cancel approval by writing /approve cancel
in a comment
What is the reason behind for adding pingInterval?
What is the reason behind for adding pingInterval?
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.
according to Binance documentation pingInterval should set every 3 minutes.
@chairz
The server will send a ping frame. The client just have to reply with a pong. The pong reply is handled by the websocket library. You can test the websocket example files, it should run more than 3 minutes which also means that the ping-pong is handled correctly.
The server will send a ping frame. The client just have to reply with a pong. The pong reply is handled by the websocket library. You can test the websocket example files, it should run more than 3 minutes which also means that the ping-pong is handled correctly.
Hi, in my tests when you don't set ping interval explicitly socket connections drop after 3 minutes.
I have tested it on my end and data is still pushing through after 5 minutes. Please provide your test file along with pom.xml
https://github.com/square/okhttp/issues/5833 https://github.com/square/okhttp/pull/6730
You can take a look at these 2 links to understand more about it. tldr: OKHTTP does manages ping frame internally and replies with a pong.
Hi @mahbodsn, we're closing the PR as so far it doesn't seem to be an issue with this project directly and there's has not been new complains.