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

error: Websocket already connected

mshogin opened this issue · comments

That comes from https://github.com/thrasher-corp/gocryptotrader/blob/master/exchanges/stream/websocket.go#L187

`
0 0x0000000000cfe8bb in github.com/thrasher-corp/gocryptotrader/exchanges/stream.(*Websocket).Connect
at ./exchanges/stream/websocket.go:172
1 0x00000000015c4f2d in github.com/thrasher-corp/gocryptotrader/engine.(*Engine).WebsocketRoutine.func1
at ./engine/routines.go:237
2 0x00000000004857c1 in runtime.goexit
at /usr/local/go/src/runtime/asm_amd64.s:1371

0 0x0000000000cfe8bb in github.com/thrasher-corp/gocryptotrader/exchanges/stream.(*Websocket).Connect
at ./exchanges/stream/websocket.go:172
1 0x00000000015b8b2a in github.com/thrasher-corp/gocryptotrader/engine.(*ExchangeCurrencyPairSyncer).Start
at ./engine/syncer.go:520
2 0x00000000004857c1 in runtime.goexit
at /usr/local/go/src/runtime/asm_amd64.s:1371

`

OS
Linux mshogin-laptop 5.8.0-44-generic #50~20.04.1-Ubuntu SMP Wed Feb 10 21:07:30 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

go
go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/mshogin/.cache/go-build" GOENV="/home/mshogin/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/home/mshogin/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/mshogin/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/local/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64" GOVCS="" GOVERSION="go1.16" GCCGO="gccgo" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/home/mshogin/gocryptotrader/go.mod" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1065314705=/tmp/go-build -gno-record-gcc-switches"
About config.
Disable everything exept:

  • orderbook
  • bitstamp
  • Fixer

Example is here
https://gist.github.com/mshogin/d5e9c40764f95d828a919372fd88d9c1

Hi, @mshogin
I am having a hard time replicating this issue in WSL and using your config from the gist.
I think I might need some more information, just to help me track down what's going on, can you paste me the stack trace when you get the error, its just strange how we are having an issue when we access the field w.exchangeName, if it's going to panix it should have a winge up at HERE Also We don't need any of this. are you running this on master? Or running any modified code?
Hopefully, we can get this resolved as fast as possible.

I think it might be something to do with the multistage locks. Can you test out some changes I made, I can refactor and add tests if it works. MY BRANCH