sacOO7 / socketcluster-client-go

GO client for socketcluster
https://socketcluster.io/
Apache License 2.0
56 stars 20 forks source link

check conversion is ok #15

Closed stevenaldinger closed 3 years ago

stevenaldinger commented 3 years ago

fixes panic on conversion

panic: interface conversion: interface {} is nil, not map[string]interface {}

goroutine 37 [running]:
github.com/sacOO7/socketcluster-client-go/scclient/parser.GetMessageDetails(0x0, 0x0, 0x0, 0x6d7d40, 0xc000058ef0, 0x7cc220, 0xc00000e480, 0x9870b4, 0x9870b4, 0xf4c)
    /go/pkg/mod/github.com/sac!o!o7/socketcluster-client-go@v1.0.0/scclient/parser/parser.go:28 +0x40e
github.com/sacOO7/socketcluster-client-go/scclient.(*Client).registerCallbacks.func3(0x0, 0x0, 0xc0001ac000, 0xc000106080, 0x76b0e9, 0x26, 0x100, 0x0, 0x0, 0x0, ...)
    /go/pkg/mod/github.com/sac!o!o7/socketcluster-client-go@v1.0.0/scclient/client.go:65 +0x188
github.com/sacOO7/gowebsocket.(*Socket).Connect.func4(0xc000108020)
    /go/pkg/mod/github.com/sac!o!o7/gowebsocket@v0.0.0-20210105141656-425813c1c643/gowebsocket.go:154 +0x264
created by github.com/sacOO7/gowebsocket.(*Socket).Connect
    /go/pkg/mod/github.com/sac!o!o7/gowebsocket@v0.0.0-20210105141656-425813c1c643/gowebsocket.go:133 +0x50c
gobliggg commented 3 years ago

Any plan to merge this PR?

stevenaldinger commented 3 years ago

I kept pushing to this same branch for my own use at the time and after the second commit its not in a good spot to merge anymore (refers to my fork in the go.mod). This repo isn't maintained though and I spent a ton of time trying to get it to work in production and just ran into tons of issues the whole time including seemingly random panics and stuff when trying to make it automatically reconnect. It could've been how I was using the library but I don't recommend using it unless its for a small side project. I can't point you to a better solution though either.

sacOO7 commented 3 years ago

Sorry, to hear that, I will be making some changes to the repo. to fix some of the issues, probably by next week. That includes changes to gowebsocket and socketcluster client go