Websocket stuck
idoall opened this issue · comments
idoall commented
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"
- 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
idoall commented
WebSocket Status :Init:true Connected:true IsConnecting:false IsConnectionMonitorRunning:true IsDataMonitorRunning:false IsTrafficMonitorRunning:true
Adrian Gallagher commented