binance / binance/binance-futures-connector-java

服务器断开websocket连接后,JAVA SDK检测不出(onClose, onError回调没有被触发)

Open
#31 11 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
191
Forks
96
PR merge metrics
No merged PRs in 30d

Description

SDK version: 3.0.2
交易:U本位合约
订阅:combineStreams
订阅内容:!miniTicker@arr, userData

问题描述:
1. listenKey 续期一次/10分钟,没有异常,报错
2. 4月2订阅成功,之后数据推送正常(价格,订单成交等信息),期间没有任何异常(没有处罚onClose, onError)
3. 4月9 出现订单成交,没有websocket推送, 同时miniTicker也没有推送,但问题是onClose, onError 注册的回调方法没有被调用(我的程序支持自动重新订阅,但是依赖onClose, onError回调)

![screenshot-20240409-185108](https://github.com/binance/binance-futures-connector-java/assets/147680968/92d59369-507e-4610-bff2-3ab770fa42f5)

@aisling-2 @jonte-z @

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the SDK 3.0.2 failure with the combineStreams subscription for !miniTicker@arr and userData, then trace the websocket lifecycle around the onClose and onError callbacks. The payload names no source files or tests, so identify the relevant connection and callback entry points first. Done means a lost websocket connection reliably triggers the registered callback so the client can resubscribe.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.