thrasher-corp / gocryptotrader

A cryptocurrency trading bot and framework supporting multiple exchanges written in Golang.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Websocket stuck

idoall opened this issue · comments

New Issue

Websocket stuck

When switching to a usable proxy, the websocket will get stuck when trying connect again.

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

  • Operating System:
    mac 11.5
  • GoCryptoTrader version (gocryptotrader -version):
    GoCryptoTrader v0.1 amd64 go1.17.6 pre-release.

Expected Behavior

Current Behavior

When the proxy network switches, websockt will output "binance websocket has been disconnected. Reason: read TCP 10.17.0.6:65306 - > 52.68.124.244:9443: use of closed network connection"
  1. Use a timer to detect websocket every 5 minutes
If ws.Isconnected() {
    return
}else{
    ws.connect()
}

Failure Logs

binance websocket has been disconnected. Reason: read TCP 10.17.0.6:65306 - > 52.68.124.244:9443: use of closed network connection

WebSocket Status :Init:true Connected:true IsConnecting:false IsConnectionMonitorRunning:true IsDataMonitorRunning:false IsTrafficMonitorRunning:true

Hey @idoall, are you still experiencing this issue after #1059 was merged in?