gateio / WebSocket-API

gateio WebSocket-API
56 stars 32 forks source link

经常retry 关键retry没有一次是成功的 #14

Closed qs-lll closed 3 years ago

qs-lll commented 3 years ago

websocket connection lost, retry to reconnect error returned: code: 2, message: http get status code err, status : 400, url : http://127.0.0.1:8130/ws_auth, info : {"label":"REQUEST_EXPIRED","message":"gap between request Timestamp and server time exceeds 60"}

error returned: error returned: code: 2, message: http get status code err, status : 400, url : http://127.0.0.1:8130/ws_auth, info : {"label":"REQUEST_EXPIRED","message":"gap between request Timestamp and server time exceeds 60"}

code: 2, message: http get status code err, status : 400, url : http://127.0.0.1:8130/ws_auth, info : {"label":"REQUEST_EXPIRED","message":"gap between request Timestamp and server time exceeds 60"}

revilwang commented 3 years ago

这种情况说明客户端与服务端时间差距过大,访问 https://time.is/ 确保本地的时间与标准时间的差距是否过大

qs-lll commented 3 years ago

首次启动正常,跑着跑着断线就retry不上了 不要甩了

revilwang commented 3 years ago

用的是 SDK 还是自己的代码

qs-lll commented 3 years ago

是的 你可以写个demo 然后断网试试看 python sdk

revilwang commented 3 years ago

好的,我们检查下 SDK 的逻辑。SDK 最新新上线,会可能存在类似这种我们没有测试的情况

另外建议提 issue 的时候,至少提供以下信息:

  1. 是否使用了 SDK,如果使用了,具体是哪个 SDK。未使用,最好附上自己的代码片段
  2. 具体的业务场景
  3. 具体使用的 API 或者订阅的WebSocket 通道

这不是甩锅的问题,而是为了减少来回沟通成本,没有任何信息的 issue 我们是无法提供有效支持的,只能反复询问补足我们缺失的信息

qs-lll commented 3 years ago

ok,请在代码更新完成之后关闭issue

revilwang commented 3 years ago

gate-ws SDK 确认存在类似问题,稍后修复。

另外 gate-ws 的 issue 最好改到 gateio/gatews 这里提交,本仓库已不再继续更新

revilwang commented 3 years ago

已推送 gate-ws 0.1.2 版本,修复重连后的订阅无法成功的问题

revilwang commented 3 years ago

本 issue 关闭,如果有新的问题,请在 gateio/gatews 提交