Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ping/pong heartbeat fails, disconnecting the app from websocket #20

Open
HikaGenji opened this issue Jun 27, 2020 · 6 comments
Open

ping/pong heartbeat fails, disconnecting the app from websocket #20

HikaGenji opened this issue Jun 27, 2020 · 6 comments

Comments

@HikaGenji
Copy link

the app connects to the public websocket, subscribe to some market data, e.g. ticker ETH-BTC then i get this after a few pings:

trace:

java.net.SocketTimeoutException: sent ping but didn't receive pong within 20000ms (after 0 successful ping/pongs)
at okhttp3.internal.ws.RealWebSocket.writePingFrame(RealWebSocket.java:545) ~[okhttp-3.14.9.jar:na]
at okhttp3.internal.ws.RealWebSocket$PingRunnable.run(RealWebSocket.java:529) ~[okhttp-3.14.9.jar:na]
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[na:na]
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[na:na]
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]

@1bazinga25
Copy link
Contributor

how long have you been this?

@HikaGenji
Copy link
Author

since i started using the java sdk, about a week ago

@1bazinga25
Copy link
Contributor

I will check it with developer, please be patient to wait.

@xinghui322
Copy link

Remove this code pingInterval(20, TimeUnit.SECONDS) at com/kucoin/sdk/factory/HttpClientFactory.java:32 maybe work.

@1bazinga25
Copy link
Contributor

Have you fixed this issue now?

@denistorresan
Copy link

Hi, please try to apply my PR #56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants