tatsuworks/gateway

Gateway errors on single shard and 3 shards

davidlimjh opened this issue · 1 comments

If only 1 shard is set, gateway closes connnection immediately. If 3 shards are set, this error appears:

Invalid shard."", "errorVerbose": "failed to get reader:\n nhooyr.io/websocket.(Conn).Reader\n /Users/abhimanyu/devWork/goWorkspace/pkg/mod/nhooyr.io/websocket@v1.1.1/websocket.go:348\n - websocket closed:\n nhooyr.io/websocket.(Conn).close.func1\n /Users/abhimanyu/devWork/goWorkspace/pkg/mod/nhooyr.io/websocket@v1.1.1/websocket.go:107\n - status = StatusCode(4010) and reason = "Invalid shard."\nfailed to get reader\ngithub.com/tatsuworks/gateway/internal/gatewayws.(Session).readMessage\n\t/Users/abhimanyu/devWork/goWorkspace/src/gateway/internal/gatewayws/ws.go:248\ngithub.com/tatsuworks/gateway/internal/gatewayws.(Session).Open\n\t/Users/abhimanyu/devWork/goWorkspace/src/gateway/internal/gatewayws/ws.go:108\ngithub.com/tatsuworks/gateway/internal/manager.(Manager).startShard.func1\n\t/Users/abhimanyu/devWork/goWorkspace/src/gateway/internal/manager/manager.go:89\nruntime.goexit\n\t/usr/local/opt/go/libexec/src/runtime/asm_amd64.s:1337\nfailed to read message\ngithub.com/tatsuworks/gateway/internal/gatewayws.(Session).Open\n\t/Users/abhimanyu/devWork/goWorkspace/src/gateway/internal/gatewayws/ws.go:110\ngithub.com/tatsuworks/gateway/internal/manager.(Manager).startShard.func1\n\t/Users/abhimanyu/devWork/goWorkspace/src/gateway/internal/manager/manager.go:89\nruntime.goexit\n\t/usr/local/opt/go/libexec/src/runtime/asm_amd64.s:1337"} github.com/tatsuworks/gateway/internal/manager.(Manager).startShard.func1

This is a minor issue and probably doesn't affect our production & staging deployment, just something to take note of.

It was probably configured to start more shards than was specified in the IDENTIFY